diff --git a/.github/workflows/publish-sonatype.yml b/.github/workflows/publish-sonatype.yml index 51bee24d..518dad07 100644 --- a/.github/workflows/publish-sonatype.yml +++ b/.github/workflows/publish-sonatype.yml @@ -29,11 +29,13 @@ jobs: uses: gradle/gradle-build-action@v2 - name: Publish to Sonatype - run: | - ./gradlew --parallel --no-daemon publish + run: |- + export -- GPG_SIGNING_KEY_ID + printenv -- GPG_SIGNING_KEY | gpg --batch --passphrase-fd 3 --import 3<<< "$GPG_SIGNING_PASSWORD" + GPG_SIGNING_KEY_ID="$(gpg --with-colons --list-keys | awk -F : -- '/^pub:/ { getline; print "0x" substr($10, length($10) - 7) }')" + ./gradlew publishAndReleaseToMavenCentral --stacktrace -PmavenCentralUsername="$SONATYPE_USERNAME" -PmavenCentralPassword="$SONATYPE_PASSWORD" env: SONATYPE_USERNAME: ${{ secrets.FINCH_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.FINCH_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }} - GPG_SIGNING_KEY_ID: ${{ secrets.FINCH_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }} GPG_SIGNING_KEY: ${{ secrets.FINCH_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }} GPG_SIGNING_PASSWORD: ${{ secrets.FINCH_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 8cf3f601..d4b7eca7 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -20,6 +20,5 @@ jobs: env: SONATYPE_USERNAME: ${{ secrets.FINCH_SONATYPE_USERNAME || secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.FINCH_SONATYPE_PASSWORD || secrets.SONATYPE_PASSWORD }} - GPG_SIGNING_KEY_ID: ${{ secrets.FINCH_SONATYPE_GPG_SIGNING_KEY_ID || secrets.GPG_SIGNING_KEY_ID }} GPG_SIGNING_KEY: ${{ secrets.FINCH_SONATYPE_GPG_SIGNING_KEY || secrets.GPG_SIGNING_KEY }} GPG_SIGNING_PASSWORD: ${{ secrets.FINCH_SONATYPE_GPG_SIGNING_PASSWORD || secrets.GPG_SIGNING_PASSWORD }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 271a68cf..de0960ab 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.11.1" + ".": "1.12.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 6db8f59f..eacfbb3f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 38 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-c7c3b67aee7f77702be22b17af22bdf799b8c95be8028f20ac406af8b5ec0439.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-2526a31a361274411e6cfc64858b1b084a22ffb491a9490374b717534827b3e1.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index ee682aa8..37cc93e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 1.12.0 (2024-11-27) + +Full Changelog: [v1.11.1...v1.12.0](https://github.com/Finch-API/finch-api-java/compare/v1.11.1...v1.12.0) + +### Features + +* **api:** api update ([#344](https://github.com/Finch-API/finch-api-java/issues/344)) ([995447b](https://github.com/Finch-API/finch-api-java/commit/995447bc6ce0c99dd0fef03af69574ad028fb2cc)) +* derive gpg release key's id via gpg itself ([#341](https://github.com/Finch-API/finch-api-java/issues/341)) ([5d9b02d](https://github.com/Finch-API/finch-api-java/commit/5d9b02de8fa17a49a1d05e71aea488007d6db1a4)) + + +### Bug Fixes + +* remove reference to removed deps 'guava' ([ab6b83c](https://github.com/Finch-API/finch-api-java/commit/ab6b83ceff97195bced4391a82dc4fafe086ad3e)) + + +### Chores + +* fix formatting ([a8911c2](https://github.com/Finch-API/finch-api-java/commit/a8911c2030d43fa0de1e13428378a099366a22b4)) +* **internal:** codegen changes ([#340](https://github.com/Finch-API/finch-api-java/issues/340)) ([3c5d768](https://github.com/Finch-API/finch-api-java/commit/3c5d768f7a1511c6625b6008f3140c5a7ad1e3cd)) +* **internal:** codegen changes ([#342](https://github.com/Finch-API/finch-api-java/issues/342)) ([3876694](https://github.com/Finch-API/finch-api-java/commit/3876694b22866aeed1e47ab17264f253001d9290)) +* **internal:** codegen related update ([#335](https://github.com/Finch-API/finch-api-java/issues/335)) ([4c594c8](https://github.com/Finch-API/finch-api-java/commit/4c594c8869c07387731fdde4519575bb93f865e5)) +* **internal:** codegen related update ([#337](https://github.com/Finch-API/finch-api-java/issues/337)) ([586ee38](https://github.com/Finch-API/finch-api-java/commit/586ee38c5744b36d44dd42756cc74bf1d542ca56)) +* **internal:** codegen related update ([#343](https://github.com/Finch-API/finch-api-java/issues/343)) ([2827201](https://github.com/Finch-API/finch-api-java/commit/28272014e7a7c5439b369c92d336c9247f226368)) +* **internal:** update example values ([#339](https://github.com/Finch-API/finch-api-java/issues/339)) ([de78eab](https://github.com/Finch-API/finch-api-java/commit/de78eab92fb90d7d324d99f93f6dbb4d0e7e3cd0)) + ## 1.11.1 (2024-11-20) Full Changelog: [v1.11.0...v1.11.1](https://github.com/Finch-API/finch-api-java/compare/v1.11.0...v1.11.1) diff --git a/README.md b/README.md index 615d6bf4..fb49b052 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/1.11.1) +[![Maven Central](https://img.shields.io/maven-central/v/com.tryfinch.api/finch-java)](https://central.sonatype.com/artifact/com.tryfinch.api/finch-java/1.12.0) @@ -27,7 +27,7 @@ The REST API documentation can be found [in the Finch Documentation Center](htt ```kotlin -implementation("com.tryfinch.api:finch-java:1.11.1") +implementation("com.tryfinch.api:finch-java:1.12.0") ``` #### Maven @@ -36,7 +36,7 @@ implementation("com.tryfinch.api:finch-java:1.11.1") com.tryfinch.api finch-java - 1.11.1 + 1.12.0 ``` @@ -294,6 +294,22 @@ FinchClient client = FinchOkHttpClient.builder() .build(); ``` +## Logging + +We use the standard [OkHttp logging interceptor](https://github.com/square/okhttp/tree/master/okhttp-logging-interceptor). + +You can enable logging by setting the environment variable `FINCH_LOG` to `info`. + +```sh +$ export FINCH_LOG=info +``` + +Or to `debug` for more verbose logging. + +```sh +$ export FINCH_LOG=debug +``` + ## Semantic versioning This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: diff --git a/build.gradle.kts b/build.gradle.kts index c9a7ed3b..1c0d6a5c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,20 +1,10 @@ plugins { - id("io.github.gradle-nexus.publish-plugin") version "1.1.0" + } allprojects { group = "com.tryfinch.api" - version = "1.11.1" // x-release-please-version + version = "1.12.0" // x-release-please-version } -nexusPublishing { - repositories { - sonatype { - nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) - snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) - username.set(System.getenv("SONATYPE_USERNAME")) - password.set(System.getenv("SONATYPE_PASSWORD")) - } - } -} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index b88cd06f..493cb327 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,12 +1,16 @@ plugins { `kotlin-dsl` + kotlin("jvm") version "1.9.22" + id("com.vanniktech.maven.publish") version "0.28.0" } repositories { gradlePluginPortal() + mavenCentral() } dependencies { implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0") implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.23") + implementation("com.vanniktech:gradle-maven-publish-plugin:0.28.0") } diff --git a/buildSrc/src/main/kotlin/finch.java.gradle.kts b/buildSrc/src/main/kotlin/finch.java.gradle.kts index 1de5b8a8..32a150ed 100644 --- a/buildSrc/src/main/kotlin/finch.java.gradle.kts +++ b/buildSrc/src/main/kotlin/finch.java.gradle.kts @@ -1,6 +1,9 @@ import com.diffplug.gradle.spotless.SpotlessExtension import org.gradle.api.tasks.testing.logging.TestExceptionFormat -import java.util.Locale +import com.vanniktech.maven.publish.JavaLibrary +import com.vanniktech.maven.publish.JavadocJar +import com.vanniktech.maven.publish.MavenPublishBaseExtension +import com.vanniktech.maven.publish.SonatypeHost plugins { `java-library` @@ -11,11 +14,6 @@ repositories { mavenCentral() } -configure { - withJavadocJar() - withSourcesJar() -} - configure { java { importOrder() @@ -36,10 +34,6 @@ tasks.withType().configureEach { options.release.set(8) } -tasks.named("javadocJar") { - setZip64(true) -} - tasks.named("jar") { manifest { attributes(mapOf( diff --git a/buildSrc/src/main/kotlin/finch.kotlin.gradle.kts b/buildSrc/src/main/kotlin/finch.kotlin.gradle.kts index bad07eed..02304634 100644 --- a/buildSrc/src/main/kotlin/finch.kotlin.gradle.kts +++ b/buildSrc/src/main/kotlin/finch.kotlin.gradle.kts @@ -1,5 +1,6 @@ import com.diffplug.gradle.spotless.SpotlessExtension import org.jetbrains.kotlin.gradle.tasks.KotlinCompile +import com.vanniktech.maven.publish.* plugins { id("finch.java") diff --git a/buildSrc/src/main/kotlin/finch.publish.gradle.kts b/buildSrc/src/main/kotlin/finch.publish.gradle.kts index 86ee4657..dd28e5e0 100644 --- a/buildSrc/src/main/kotlin/finch.publish.gradle.kts +++ b/buildSrc/src/main/kotlin/finch.publish.gradle.kts @@ -3,65 +3,52 @@ import org.gradle.api.publish.maven.MavenPublication import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.register import org.gradle.kotlin.dsl.get +import com.vanniktech.maven.publish.JavaLibrary +import com.vanniktech.maven.publish.JavadocJar +import com.vanniktech.maven.publish.MavenPublishBaseExtension +import com.vanniktech.maven.publish.SonatypeHost plugins { - `maven-publish` - `signing` + id("com.vanniktech.maven.publish") } -configure { - publications { - register("maven") { - from(components["java"]) +repositories { + gradlePluginPortal() + mavenCentral() +} - pom { - name.set("API Reference") - description.set("The Finch HRIS API provides a unified way to connect to a multitide of HRIS\nsystems. The API requires an access token issued by Finch.\n\nBy default, Organization and Payroll requests use Finch's\n[Data Syncs](/developer-resources/Data-Syncs). If a request is made before the\ninitial sync has completed, Finch will request data live from the provider. The\nlatency on live requests may range from seconds to minutes depending on the\nprovider and batch size. For automated integrations, Deductions requests (both\nread and write) are always made live to the provider. Latencies may range from\nseconds to minutes depending on the provider and batch size.\n\nEmployer products are specified by the product parameter, a space-separated list\nof products that your application requests from an employer authenticating\nthrough Finch Connect. Valid product names are—\n\n- `company`: Read basic company data\n\n- `directory`: Read company directory and organization structure\n\n- `individual`: Read individual data, excluding income and employment data\n\n- `employment`: Read individual employment and income data\n\n- `payment`: Read payroll and contractor related payments by the company\n\n- `pay_statement`: Read detailed pay statements for each individual\n\n- `benefits`: Create and manage deductions and contributions and enrollment for\n an employer\n\n[![Open in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4?action=collection%2Ffork&collection-url=entityId%3D21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4%26entityType%3Dcollection%26workspaceId%3D1edf19bc-e0a8-41e9-ac55-481a4b50790b)") - url.set("https://developer.tryfinch.com/") +extra["signingInMemoryKey"] = System.getenv("GPG_SIGNING_KEY") +extra["signingInMemoryKeyId"] = System.getenv("GPG_SIGNING_KEY_ID") +extra["signingInMemoryKeyPassword"] = System.getenv("GPG_SIGNING_PASSWORD") - licenses { - license { - name.set("Apache-2.0") - } - } +configure { + signAllPublications() + publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) - developers { - developer { - name.set("Finch") - email.set("founders@tryfinch.com") - } - } + this.coordinates(project.group.toString(), project.name, project.version.toString()) - scm { - connection.set("scm:git:git://github.com/Finch-API/finch-api-java.git") - developerConnection.set("scm:git:git://github.com/Finch-API/finch-api-java.git") - url.set("https://github.com/Finch-API/finch-api-java") - } + pom { + name.set("API Reference") + description.set("The Finch HRIS API provides a unified way to connect to a multitide of HRIS\nsystems. The API requires an access token issued by Finch.\n\nBy default, Organization and Payroll requests use Finch's\n[Data Syncs](/developer-resources/Data-Syncs). If a request is made before the\ninitial sync has completed, Finch will request data live from the provider. The\nlatency on live requests may range from seconds to minutes depending on the\nprovider and batch size. For automated integrations, Deductions requests (both\nread and write) are always made live to the provider. Latencies may range from\nseconds to minutes depending on the provider and batch size.\n\nEmployer products are specified by the product parameter, a space-separated list\nof products that your application requests from an employer authenticating\nthrough Finch Connect. Valid product names are—\n\n- `company`: Read basic company data\n\n- `directory`: Read company directory and organization structure\n\n- `individual`: Read individual data, excluding income and employment data\n\n- `employment`: Read individual employment and income data\n\n- `payment`: Read payroll and contractor related payments by the company\n\n- `pay_statement`: Read detailed pay statements for each individual\n\n- `benefits`: Create and manage deductions and contributions and enrollment for\n an employer\n\n[![Open in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4?action=collection%2Ffork&collection-url=entityId%3D21027137-08db0929-883d-4094-a9ce-dbf5a9bee4a4%26entityType%3Dcollection%26workspaceId%3D1edf19bc-e0a8-41e9-ac55-481a4b50790b)") + url.set("https://developer.tryfinch.com/") - versionMapping { - allVariants { - fromResolutionResult() - } - } + licenses { + license { + name.set("Apache-2.0") } } - } -} -signing { - val signingKeyId = System.getenv("GPG_SIGNING_KEY_ID")?.ifBlank { null } - val signingKey = System.getenv("GPG_SIGNING_KEY")?.ifBlank { null } - val signingPassword = System.getenv("GPG_SIGNING_PASSWORD")?.ifBlank { null } - if (signingKey != null && signingPassword != null) { - useInMemoryPgpKeys( - signingKeyId, - signingKey, - signingPassword, - ) - sign(publishing.publications["maven"]) - } -} + developers { + developer { + name.set("Finch") + email.set("founders@tryfinch.com") + } + } -tasks.named("publish") { - dependsOn(":closeAndReleaseSonatypeStagingRepository") + scm { + connection.set("scm:git:git://github.com/Finch-API/finch-api-java.git") + developerConnection.set("scm:git:git://github.com/Finch-API/finch-api-java.git") + url.set("https://github.com/Finch-API/finch-api-java") + } + } } diff --git a/finch-java-client-okhttp/build.gradle.kts b/finch-java-client-okhttp/build.gradle.kts index dd0be767..77047196 100644 --- a/finch-java-client-okhttp/build.gradle.kts +++ b/finch-java-client-okhttp/build.gradle.kts @@ -7,6 +7,7 @@ dependencies { api(project(":finch-java-core")) implementation("com.squareup.okhttp3:okhttp:4.12.0") + implementation("com.squareup.okhttp3:logging-interceptor:4.12.0") testImplementation(kotlin("test")) testImplementation("org.assertj:assertj-core:3.25.3") diff --git a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt index af6c2aa4..c34c5d11 100644 --- a/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt +++ b/finch-java-client-okhttp/src/main/kotlin/com/tryfinch/api/client/okhttp/OkHttpClient.kt @@ -23,6 +23,7 @@ import okhttp3.Request import okhttp3.RequestBody import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.Response +import okhttp3.logging.HttpLoggingInterceptor import okio.BufferedSink class OkHttpClient @@ -30,14 +31,30 @@ private constructor(private val okHttpClient: okhttp3.OkHttpClient, private val HttpClient { private fun getClient(requestOptions: RequestOptions): okhttp3.OkHttpClient { - val timeout = requestOptions.timeout ?: return okHttpClient - return okHttpClient - .newBuilder() - .connectTimeout(timeout) - .readTimeout(timeout) - .writeTimeout(timeout) - .callTimeout(if (timeout.seconds == 0L) timeout else timeout.plusSeconds(30)) - .build() + val clientBuilder = okHttpClient.newBuilder() + + val logLevel = + when (System.getenv("FINCH_LOG")?.lowercase()) { + "info" -> HttpLoggingInterceptor.Level.BASIC + "debug" -> HttpLoggingInterceptor.Level.BODY + else -> null + } + if (logLevel != null) { + clientBuilder.addNetworkInterceptor( + HttpLoggingInterceptor().setLevel(logLevel).apply { redactHeader("Authorization") } + ) + } + + val timeout = requestOptions.timeout + if (timeout != null) { + clientBuilder + .connectTimeout(timeout) + .readTimeout(timeout) + .writeTimeout(timeout) + .callTimeout(if (timeout.seconds == 0L) timeout else timeout.plusSeconds(30)) + } + + return clientBuilder.build() } override fun execute( diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/errors/FinchError.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/errors/FinchError.kt index 05943d88..14aabb06 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/errors/FinchError.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/errors/FinchError.kt @@ -19,20 +19,6 @@ private constructor( val additionalProperties: Map, ) { - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is FinchError && this.additionalProperties == other.additionalProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */ - } - - override fun toString() = "FinchError{additionalProperties=$additionalProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -71,4 +57,16 @@ private constructor( fun build(): FinchError = FinchError(additionalProperties.toImmutable()) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is FinchError && additionalProperties == other.additionalProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */ + + override fun toString() = "FinchError{additionalProperties=$additionalProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt index af057356..5ee50b30 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccessTokenCreateParams.kt @@ -35,6 +35,12 @@ constructor( fun redirectUri(): Optional = Optional.ofNullable(redirectUri) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): AccessTokenCreateBody { return AccessTokenCreateBody( @@ -137,43 +143,19 @@ constructor( return true } - return /* spotless:off */ other is AccessTokenCreateBody && this.code == other.code && this.clientId == other.clientId && this.clientSecret == other.clientSecret && this.redirectUri == other.redirectUri && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AccessTokenCreateBody && code == other.code && clientId == other.clientId && clientSecret == other.clientSecret && redirectUri == other.redirectUri && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(code, clientId, clientSecret, redirectUri, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(code, clientId, clientSecret, redirectUri, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AccessTokenCreateBody{code=$code, clientId=$clientId, clientSecret=$clientSecret, redirectUri=$redirectUri, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is AccessTokenCreateParams && this.code == other.code && this.clientId == other.clientId && this.clientSecret == other.clientSecret && this.redirectUri == other.redirectUri && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(code, clientId, clientSecret, redirectUri, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "AccessTokenCreateParams{code=$code, clientId=$clientId, clientSecret=$clientSecret, redirectUri=$redirectUri, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -194,13 +176,14 @@ constructor( @JvmSynthetic internal fun from(accessTokenCreateParams: AccessTokenCreateParams) = apply { - this.code = accessTokenCreateParams.code - this.clientId = accessTokenCreateParams.clientId - this.clientSecret = accessTokenCreateParams.clientSecret - this.redirectUri = accessTokenCreateParams.redirectUri - additionalHeaders(accessTokenCreateParams.additionalHeaders) - additionalQueryParams(accessTokenCreateParams.additionalQueryParams) - additionalBodyProperties(accessTokenCreateParams.additionalBodyProperties) + code = accessTokenCreateParams.code + clientId = accessTokenCreateParams.clientId + clientSecret = accessTokenCreateParams.clientSecret + redirectUri = accessTokenCreateParams.redirectUri + additionalHeaders = accessTokenCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = accessTokenCreateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + accessTokenCreateParams.additionalBodyProperties.toMutableMap() } fun code(code: String) = apply { this.code = code } @@ -342,4 +325,17 @@ constructor( additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is AccessTokenCreateParams && code == other.code && clientId == other.clientId && clientSecret == other.clientSecret && redirectUri == other.redirectUri && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(code, clientId, clientSecret, redirectUri, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "AccessTokenCreateParams{code=$code, clientId=$clientId, clientSecret=$clientSecret, redirectUri=$redirectUri, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt index 7a5abab7..533e3693 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountCreateResponse.kt @@ -214,7 +214,7 @@ private constructor( return true } - return /* spotless:off */ other is AuthenticationType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AuthenticationType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -275,17 +275,14 @@ private constructor( return true } - return /* spotless:off */ other is AccountCreateResponse && this.connectionId == other.connectionId && this.companyId == other.companyId && this.providerId == other.providerId && this.accountId == other.accountId && this.authenticationType == other.authenticationType && this.products == other.products && this.accessToken == other.accessToken && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AccountCreateResponse && connectionId == other.connectionId && companyId == other.companyId && providerId == other.providerId && accountId == other.accountId && authenticationType == other.authenticationType && products == other.products && accessToken == other.accessToken && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, providerId, accountId, authenticationType, products, accessToken, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, providerId, accountId, authenticationType, products, accessToken, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AccountCreateResponse{connectionId=$connectionId, companyId=$companyId, providerId=$providerId, accountId=$accountId, authenticationType=$authenticationType, products=$products, accessToken=$accessToken, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt index b61aa426..fc26161d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountDisconnectParams.kt @@ -18,35 +18,20 @@ constructor( private val additionalBodyProperties: Map, ) { - @JvmSynthetic - internal fun getBody(): Optional> { - return Optional.ofNullable(additionalBodyProperties.ifEmpty { null }) - } - - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is AccountDisconnectParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + @JvmSynthetic + internal fun getBody(): Optional> { + return Optional.ofNullable(additionalBodyProperties.ifEmpty { null }) } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "AccountDisconnectParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -64,9 +49,10 @@ constructor( @JvmSynthetic internal fun from(accountDisconnectParams: AccountDisconnectParams) = apply { - additionalHeaders(accountDisconnectParams.additionalHeaders) - additionalQueryParams(accountDisconnectParams.additionalQueryParams) - additionalBodyProperties(accountDisconnectParams.additionalBodyProperties) + additionalHeaders = accountDisconnectParams.additionalHeaders.toBuilder() + additionalQueryParams = accountDisconnectParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + accountDisconnectParams.additionalBodyProperties.toMutableMap() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -196,4 +182,17 @@ constructor( additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is AccountDisconnectParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "AccountDisconnectParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt index 46a900b2..50b8cf1f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountIntrospectParams.kt @@ -14,28 +14,13 @@ constructor( private val additionalQueryParams: QueryParams, ) { - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is AccountIntrospectParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "AccountIntrospectParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -52,8 +37,8 @@ constructor( @JvmSynthetic internal fun from(accountIntrospectParams: AccountIntrospectParams) = apply { - additionalHeaders(accountIntrospectParams.additionalHeaders) - additionalQueryParams(accountIntrospectParams.additionalQueryParams) + additionalHeaders = accountIntrospectParams.additionalHeaders.toBuilder() + additionalQueryParams = accountIntrospectParams.additionalQueryParams.toBuilder() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -157,4 +142,17 @@ constructor( fun build(): AccountIntrospectParams = AccountIntrospectParams(additionalHeaders.build(), additionalQueryParams.build()) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is AccountIntrospectParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "AccountIntrospectParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt index efd292d3..0602e000 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateEvent.kt @@ -997,17 +997,14 @@ private constructor( return true } - return /* spotless:off */ other is Accounts && this.routingNumber == other.routingNumber && this.accountName == other.accountName && this.institutionName == other.institutionName && this.accountType == other.accountType && this.accountNumber == other.accountNumber && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Accounts && routingNumber == other.routingNumber && accountName == other.accountName && institutionName == other.institutionName && accountType == other.accountType && accountNumber == other.accountNumber && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Accounts{routingNumber=$routingNumber, accountName=$accountName, institutionName=$institutionName, accountType=$accountType, accountNumber=$accountNumber, additionalProperties=$additionalProperties}" @@ -1179,17 +1176,14 @@ private constructor( return true } - return /* spotless:off */ other is Parent && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Parent && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Parent{name=$name, additionalProperties=$additionalProperties}" @@ -1200,17 +1194,14 @@ private constructor( return true } - return /* spotless:off */ other is Departments && this.name == other.name && this.parent == other.parent && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Departments && name == other.name && parent == other.parent && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, parent, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, parent, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Departments{name=$name, parent=$parent, additionalProperties=$additionalProperties}" @@ -1312,17 +1303,14 @@ private constructor( return true } - return /* spotless:off */ other is Entity && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Entity && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Entity{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -1491,17 +1479,14 @@ private constructor( return true } - return /* spotless:off */ other is Locations && this.line1 == other.line1 && this.line2 == other.line2 && this.city == other.city && this.state == other.state && this.postalCode == other.postalCode && this.country == other.country && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Locations && line1 == other.line1 && line2 == other.line2 && city == other.city && state == other.state && postalCode == other.postalCode && country == other.country && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Locations{line1=$line1, line2=$line2, city=$city, state=$state, postalCode=$postalCode, country=$country, additionalProperties=$additionalProperties}" @@ -1512,17 +1497,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedCompanyFields && this.id == other.id && this.legalName == other.legalName && this.entity == other.entity && this.primaryEmail == other.primaryEmail && this.primaryPhoneNumber == other.primaryPhoneNumber && this.ein == other.ein && this.accounts == other.accounts && this.departments == other.departments && this.locations == other.locations && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedCompanyFields && id == other.id && legalName == other.legalName && entity == other.entity && primaryEmail == other.primaryEmail && primaryPhoneNumber == other.primaryPhoneNumber && ein == other.ein && accounts == other.accounts && departments == other.departments && locations == other.locations && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, legalName, entity, primaryEmail, primaryPhoneNumber, ein, accounts, departments, locations, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, legalName, entity, primaryEmail, primaryPhoneNumber, ein, accounts, departments, locations, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedCompanyFields{id=$id, legalName=$legalName, entity=$entity, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, ein=$ein, accounts=$accounts, departments=$departments, locations=$locations, additionalProperties=$additionalProperties}" @@ -1879,17 +1861,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" @@ -1900,17 +1879,14 @@ private constructor( return true } - return /* spotless:off */ other is Individuals && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.isActive == other.isActive && this.department == other.department && this.manager == other.manager && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Individuals && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && isActive == other.isActive && department == other.department && manager == other.manager && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, isActive, department, manager, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, isActive, department, manager, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Individuals{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, isActive=$isActive, department=$department, manager=$manager, additionalProperties=$additionalProperties}" @@ -2010,17 +1986,14 @@ private constructor( return true } - return /* spotless:off */ other is Paging && this.count == other.count && this.offset == other.offset && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Paging && count == other.count && offset == other.offset && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(count, offset, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(count, offset, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Paging{count=$count, offset=$offset, additionalProperties=$additionalProperties}" @@ -2031,17 +2004,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedDirectoryFields && this.paging == other.paging && this.individuals == other.individuals && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedDirectoryFields && paging == other.paging && individuals == other.individuals && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paging, individuals, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paging, individuals, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedDirectoryFields{paging=$paging, individuals=$individuals, additionalProperties=$additionalProperties}" @@ -2464,17 +2434,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -2576,17 +2543,14 @@ private constructor( return true } - return /* spotless:off */ other is Employment && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Employment && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Employment{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -2704,17 +2668,14 @@ private constructor( return true } - return /* spotless:off */ other is Income && this.amount == other.amount && this.currency == other.currency && this.unit == other.unit && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Income && amount == other.amount && currency == other.currency && unit == other.unit && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(amount, currency, unit, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(amount, currency, unit, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Income{amount=$amount, currency=$currency, unit=$unit, additionalProperties=$additionalProperties}" @@ -2883,17 +2844,14 @@ private constructor( return true } - return /* spotless:off */ other is Location && this.line1 == other.line1 && this.line2 == other.line2 && this.city == other.city && this.state == other.state && this.postalCode == other.postalCode && this.country == other.country && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Location && line1 == other.line1 && line2 == other.line2 && city == other.city && state == other.state && postalCode == other.postalCode && country == other.country && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Location{line1=$line1, line2=$line2, city=$city, state=$state, postalCode=$postalCode, country=$country, additionalProperties=$additionalProperties}" @@ -2972,17 +2930,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" @@ -2993,17 +2948,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedEmploymentFields && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.title == other.title && this.startDate == other.startDate && this.endDate == other.endDate && this.isActive == other.isActive && this.incomeHistory == other.incomeHistory && this.classCode == other.classCode && this.customFields == other.customFields && this.department == other.department && this.employment == other.employment && this.income == other.income && this.location == other.location && this.manager == other.manager && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedEmploymentFields && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && title == other.title && startDate == other.startDate && endDate == other.endDate && isActive == other.isActive && incomeHistory == other.incomeHistory && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && income == other.income && location == other.location && manager == other.manager && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, title, startDate, endDate, isActive, incomeHistory, classCode, customFields, department, employment, income, location, manager, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, title, startDate, endDate, isActive, incomeHistory, classCode, customFields, department, employment, income, location, manager, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedEmploymentFields{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, title=$title, startDate=$startDate, endDate=$endDate, isActive=$isActive, incomeHistory=$incomeHistory, classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, income=$income, location=$location, manager=$manager, additionalProperties=$additionalProperties}" @@ -3391,17 +3343,14 @@ private constructor( return true } - return /* spotless:off */ other is Emails && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Emails && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Emails{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -3501,17 +3450,14 @@ private constructor( return true } - return /* spotless:off */ other is PhoneNumbers && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PhoneNumbers && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PhoneNumbers{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -3680,17 +3626,14 @@ private constructor( return true } - return /* spotless:off */ other is Residence && this.city == other.city && this.country == other.country && this.line1 == other.line1 && this.line2 == other.line2 && this.postalCode == other.postalCode && this.state == other.state && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Residence && city == other.city && country == other.country && line1 == other.line1 && line2 == other.line2 && postalCode == other.postalCode && state == other.state && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Residence{city=$city, country=$country, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}" @@ -3701,17 +3644,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedIndividualFields && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.preferredName == other.preferredName && this.dob == other.dob && this.gender == other.gender && this.ethnicity == other.ethnicity && this.ssn == other.ssn && this.encryptedSsn == other.encryptedSsn && this.emails == other.emails && this.phoneNumbers == other.phoneNumbers && this.residence == other.residence && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedIndividualFields && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && preferredName == other.preferredName && dob == other.dob && gender == other.gender && ethnicity == other.ethnicity && ssn == other.ssn && encryptedSsn == other.encryptedSsn && emails == other.emails && phoneNumbers == other.phoneNumbers && residence == other.residence && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, preferredName, dob, gender, ethnicity, ssn, encryptedSsn, emails, phoneNumbers, residence, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, preferredName, dob, gender, ethnicity, ssn, encryptedSsn, emails, phoneNumbers, residence, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedIndividualFields{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, preferredName=$preferredName, dob=$dob, gender=$gender, ethnicity=$ethnicity, ssn=$ssn, encryptedSsn=$encryptedSsn, emails=$emails, phoneNumbers=$phoneNumbers, residence=$residence, additionalProperties=$additionalProperties}" @@ -3852,17 +3792,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedPayGroupFields && this.id == other.id && this.name == other.name && this.payFrequencies == other.payFrequencies && this.individualIds == other.individualIds && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedPayGroupFields && id == other.id && name == other.name && payFrequencies == other.payFrequencies && individualIds == other.individualIds && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, name, payFrequencies, individualIds, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, name, payFrequencies, individualIds, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedPayGroupFields{id=$id, name=$name, payFrequencies=$payFrequencies, individualIds=$individualIds, additionalProperties=$additionalProperties}" @@ -4056,17 +3993,14 @@ private constructor( return true } - return /* spotless:off */ other is Paging && this.count == other.count && this.offset == other.offset && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Paging && count == other.count && offset == other.offset && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(count, offset, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(count, offset, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Paging{count=$count, offset=$offset, additionalProperties=$additionalProperties}" @@ -4455,17 +4389,14 @@ private constructor( return true } - return /* spotless:off */ other is Earnings && this.type == other.type && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Earnings && type == other.type && name == other.name && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Earnings{type=$type, name=$name, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -4621,17 +4552,14 @@ private constructor( return true } - return /* spotless:off */ other is EmployeeDeductions && this.name == other.name && this.amount == other.amount && this.type == other.type && this.preTax == other.preTax && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployeeDeductions && name == other.name && amount == other.amount && type == other.type && preTax == other.preTax && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, type, preTax, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, type, preTax, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployeeDeductions{name=$name, amount=$amount, type=$type, preTax=$preTax, currency=$currency, additionalProperties=$additionalProperties}" @@ -4756,17 +4684,14 @@ private constructor( return true } - return /* spotless:off */ other is EmployerContributions && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployerContributions && name == other.name && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployerContributions{name=$name, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -4922,17 +4847,14 @@ private constructor( return true } - return /* spotless:off */ other is Taxes && this.type == other.type && this.name == other.name && this.employer == other.employer && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Taxes && type == other.type && name == other.name && employer == other.employer && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, employer, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, employer, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Taxes{type=$type, name=$name, employer=$employer, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -4943,17 +4865,14 @@ private constructor( return true } - return /* spotless:off */ other is PayStatements && this.individualId == other.individualId && this.type == other.type && this.paymentMethod == other.paymentMethod && this.totalHours == other.totalHours && this.grossPay == other.grossPay && this.netPay == other.netPay && this.earnings == other.earnings && this.employeeDeductions == other.employeeDeductions && this.employerContributions == other.employerContributions && this.taxes == other.taxes && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatements && individualId == other.individualId && type == other.type && paymentMethod == other.paymentMethod && totalHours == other.totalHours && grossPay == other.grossPay && netPay == other.netPay && earnings == other.earnings && employeeDeductions == other.employeeDeductions && employerContributions == other.employerContributions && taxes == other.taxes && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, employeeDeductions, employerContributions, taxes, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, employeeDeductions, employerContributions, taxes, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatements{individualId=$individualId, type=$type, paymentMethod=$paymentMethod, totalHours=$totalHours, grossPay=$grossPay, netPay=$netPay, earnings=$earnings, employeeDeductions=$employeeDeductions, employerContributions=$employerContributions, taxes=$taxes, additionalProperties=$additionalProperties}" @@ -4964,17 +4883,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedPayStatementFields && this.paging == other.paging && this.payStatements == other.payStatements && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedPayStatementFields && paging == other.paging && payStatements == other.payStatements && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paging, payStatements, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paging, payStatements, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedPayStatementFields{paging=$paging, payStatements=$payStatements, additionalProperties=$additionalProperties}" @@ -5360,17 +5276,14 @@ private constructor( return true } - return /* spotless:off */ other is PayPeriod && this.startDate == other.startDate && this.endDate == other.endDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayPeriod && startDate == other.startDate && endDate == other.endDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(startDate, endDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(startDate, endDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayPeriod{startDate=$startDate, endDate=$endDate, additionalProperties=$additionalProperties}" @@ -5381,17 +5294,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedPaymentFields && this.id == other.id && this.payDate == other.payDate && this.debitDate == other.debitDate && this.companyDebit == other.companyDebit && this.grossPay == other.grossPay && this.netPay == other.netPay && this.employerTaxes == other.employerTaxes && this.employeeTaxes == other.employeeTaxes && this.individualIds == other.individualIds && this.payPeriod == other.payPeriod && this.payGroupIds == other.payGroupIds && this.payFrequencies == other.payFrequencies && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedPaymentFields && id == other.id && payDate == other.payDate && debitDate == other.debitDate && companyDebit == other.companyDebit && grossPay == other.grossPay && netPay == other.netPay && employerTaxes == other.employerTaxes && employeeTaxes == other.employeeTaxes && individualIds == other.individualIds && payPeriod == other.payPeriod && payGroupIds == other.payGroupIds && payFrequencies == other.payFrequencies && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, payDate, debitDate, companyDebit, grossPay, netPay, employerTaxes, employeeTaxes, individualIds, payPeriod, payGroupIds, payFrequencies, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, payDate, debitDate, companyDebit, grossPay, netPay, employerTaxes, employeeTaxes, individualIds, payPeriod, payGroupIds, payFrequencies, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedPaymentFields{id=$id, payDate=$payDate, debitDate=$debitDate, companyDebit=$companyDebit, grossPay=$grossPay, netPay=$netPay, employerTaxes=$employerTaxes, employeeTaxes=$employeeTaxes, individualIds=$individualIds, payPeriod=$payPeriod, payGroupIds=$payGroupIds, payFrequencies=$payFrequencies, additionalProperties=$additionalProperties}" @@ -5402,17 +5312,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedFields && this.company == other.company && this.directory == other.directory && this.individual == other.individual && this.employment == other.employment && this.payment == other.payment && this.payStatement == other.payStatement && this.payGroup == other.payGroup && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedFields && company == other.company && directory == other.directory && individual == other.individual && employment == other.employment && payment == other.payment && payStatement == other.payStatement && payGroup == other.payGroup && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(company, directory, individual, employment, payment, payStatement, payGroup, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(company, directory, individual, employment, payment, payStatement, payGroup, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedFields{company=$company, directory=$directory, individual=$individual, employment=$employment, payment=$payment, payStatement=$payStatement, payGroup=$payGroup, additionalProperties=$additionalProperties}" @@ -5431,7 +5338,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -5498,17 +5405,14 @@ private constructor( return true } - return /* spotless:off */ other is AuthenticationMethod && this.type == other.type && this.benefitsSupport == other.benefitsSupport && this.supportedFields == other.supportedFields && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AuthenticationMethod && type == other.type && benefitsSupport == other.benefitsSupport && supportedFields == other.supportedFields && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, benefitsSupport, supportedFields, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, benefitsSupport, supportedFields, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AuthenticationMethod{type=$type, benefitsSupport=$benefitsSupport, supportedFields=$supportedFields, additionalProperties=$additionalProperties}" @@ -5519,17 +5423,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.status == other.status && this.authenticationMethod == other.authenticationMethod && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && status == other.status && authenticationMethod == other.authenticationMethod && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(status, authenticationMethod, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(status, authenticationMethod, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{status=$status, authenticationMethod=$authenticationMethod, additionalProperties=$additionalProperties}" @@ -5548,7 +5449,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -5591,17 +5492,14 @@ private constructor( return true } - return /* spotless:off */ other is AccountUpdateEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AccountUpdateEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AccountUpdateEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateResponse.kt index 51463cac..ab6ad06f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AccountUpdateResponse.kt @@ -201,7 +201,7 @@ private constructor( return true } - return /* spotless:off */ other is AuthenticationType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AuthenticationType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -262,17 +262,14 @@ private constructor( return true } - return /* spotless:off */ other is AccountUpdateResponse && this.connectionId == other.connectionId && this.accountId == other.accountId && this.authenticationType == other.authenticationType && this.companyId == other.companyId && this.providerId == other.providerId && this.products == other.products && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AccountUpdateResponse && connectionId == other.connectionId && accountId == other.accountId && authenticationType == other.authenticationType && companyId == other.companyId && providerId == other.providerId && products == other.products && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, accountId, authenticationType, companyId, providerId, products, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, accountId, authenticationType, companyId, providerId, products, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AccountUpdateResponse{connectionId=$connectionId, accountId=$accountId, authenticationType=$authenticationType, companyId=$companyId, providerId=$providerId, products=$products, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedAsyncJob.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedAsyncJob.kt index 7a3f298f..248ef3dc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedAsyncJob.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedAsyncJob.kt @@ -270,7 +270,7 @@ private constructor( return true } - return /* spotless:off */ other is Status && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -351,7 +351,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -394,17 +394,14 @@ private constructor( return true } - return /* spotless:off */ other is AutomatedAsyncJob && this.jobId == other.jobId && this.jobUrl == other.jobUrl && this.type == other.type && this.status == other.status && this.createdAt == other.createdAt && this.scheduledAt == other.scheduledAt && this.startedAt == other.startedAt && this.completedAt == other.completedAt && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AutomatedAsyncJob && jobId == other.jobId && jobUrl == other.jobUrl && type == other.type && status == other.status && createdAt == other.createdAt && scheduledAt == other.scheduledAt && startedAt == other.startedAt && completedAt == other.completedAt && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(jobId, jobUrl, type, status, createdAt, scheduledAt, startedAt, completedAt, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(jobId, jobUrl, type, status, createdAt, scheduledAt, startedAt, completedAt, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AutomatedAsyncJob{jobId=$jobId, jobUrl=$jobUrl, type=$type, status=$status, createdAt=$createdAt, scheduledAt=$scheduledAt, startedAt=$startedAt, completedAt=$completedAt, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt index a0b0c574..e4409676 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/AutomatedCreateResponse.kt @@ -158,17 +158,14 @@ private constructor( return true } - return /* spotless:off */ other is AutomatedCreateResponse && this.jobId == other.jobId && this.jobUrl == other.jobUrl && this.allowedRefreshes == other.allowedRefreshes && this.remainingRefreshes == other.remainingRefreshes && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AutomatedCreateResponse && jobId == other.jobId && jobUrl == other.jobUrl && allowedRefreshes == other.allowedRefreshes && remainingRefreshes == other.remainingRefreshes && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(jobId, jobUrl, allowedRefreshes, remainingRefreshes, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(jobId, jobUrl, allowedRefreshes, remainingRefreshes, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AutomatedCreateResponse{jobId=$jobId, jobUrl=$jobUrl, allowedRefreshes=$allowedRefreshes, remainingRefreshes=$remainingRefreshes, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BaseWebhookEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BaseWebhookEvent.kt index 58aeea99..58eb9c67 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BaseWebhookEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BaseWebhookEvent.kt @@ -159,17 +159,14 @@ private constructor( return true } - return /* spotless:off */ other is BaseWebhookEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is BaseWebhookEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "BaseWebhookEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt index 7bc3beae..659c4cf1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitContribution.kt @@ -124,7 +124,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -173,17 +173,14 @@ private constructor( return true } - return /* spotless:off */ other is BenefitContribution && this.type == other.type && this.amount == other.amount && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is BenefitContribution && type == other.type && amount == other.amount && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, amount, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, amount, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "BenefitContribution{type=$type, amount=$amount, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperations.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperations.kt index 0fc3fed2..28dc51f1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperations.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFeaturesAndOperations.kt @@ -376,7 +376,7 @@ private constructor( return true } - return /* spotless:off */ other is CompanyContribution && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is CompanyContribution && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -433,7 +433,7 @@ private constructor( return true } - return /* spotless:off */ other is EmployeeDeduction && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EmployeeDeduction && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -490,7 +490,7 @@ private constructor( return true } - return /* spotless:off */ other is HsaContributionLimit && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is HsaContributionLimit && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -539,17 +539,14 @@ private constructor( return true } - return /* spotless:off */ other is BenefitFeature && this.description == other.description && this.frequencies == other.frequencies && this.employeeDeduction == other.employeeDeduction && this.companyContribution == other.companyContribution && this.annualMaximum == other.annualMaximum && this.catchUp == other.catchUp && this.hsaContributionLimit == other.hsaContributionLimit && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is BenefitFeature && description == other.description && frequencies == other.frequencies && employeeDeduction == other.employeeDeduction && companyContribution == other.companyContribution && annualMaximum == other.annualMaximum && catchUp == other.catchUp && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(description, frequencies, employeeDeduction, companyContribution, annualMaximum, catchUp, hsaContributionLimit, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(description, frequencies, employeeDeduction, companyContribution, annualMaximum, catchUp, hsaContributionLimit, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "BenefitFeature{description=$description, frequencies=$frequencies, employeeDeduction=$employeeDeduction, companyContribution=$companyContribution, annualMaximum=$annualMaximum, catchUp=$catchUp, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" @@ -560,17 +557,14 @@ private constructor( return true } - return /* spotless:off */ other is BenefitFeaturesAndOperations && this.supportedFeatures == other.supportedFeatures && this.supportedOperations == other.supportedOperations && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is BenefitFeaturesAndOperations && supportedFeatures == other.supportedFeatures && supportedOperations == other.supportedOperations && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(supportedFeatures, supportedOperations, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(supportedFeatures, supportedOperations, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "BenefitFeaturesAndOperations{supportedFeatures=$supportedFeatures, supportedOperations=$supportedOperations, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt index 4811d301..fb17c9c1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitFrequency.kt @@ -21,7 +21,7 @@ private constructor( return true } - return /* spotless:off */ other is BenefitFrequency && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is BenefitFrequency && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitType.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitType.kt index 1533534b..138757ab 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitType.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitType.kt @@ -21,7 +21,7 @@ private constructor( return true } - return /* spotless:off */ other is BenefitType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is BenefitType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitsSupport.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitsSupport.kt index 334bb09d..2645c5d0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitsSupport.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/BenefitsSupport.kt @@ -298,17 +298,14 @@ private constructor( return true } - return /* spotless:off */ other is BenefitsSupport && this.s125Medical == other.s125Medical && this.s125Dental == other.s125Dental && this.s125Vision == other.s125Vision && this.hsaPre == other.hsaPre && this.hsaPost == other.hsaPost && this.fsaMedical == other.fsaMedical && this.fsaDependentCare == other.fsaDependentCare && this.simpleIra == other.simpleIra && this.simple == other.simple && this.commuter == other.commuter && this.customPostTax == other.customPostTax && this.customPreTax == other.customPreTax && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is BenefitsSupport && s125Medical == other.s125Medical && s125Dental == other.s125Dental && s125Vision == other.s125Vision && hsaPre == other.hsaPre && hsaPost == other.hsaPost && fsaMedical == other.fsaMedical && fsaDependentCare == other.fsaDependentCare && simpleIra == other.simpleIra && simple == other.simple && commuter == other.commuter && customPostTax == other.customPostTax && customPreTax == other.customPreTax && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(s125Medical, s125Dental, s125Vision, hsaPre, hsaPost, fsaMedical, fsaDependentCare, simpleIra, simple, commuter, customPostTax, customPreTax, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(s125Medical, s125Dental, s125Vision, hsaPre, hsaPost, fsaMedical, fsaDependentCare, simpleIra, simple, commuter, customPostTax, customPreTax, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "BenefitsSupport{s125Medical=$s125Medical, s125Dental=$s125Dental, s125Vision=$s125Vision, hsaPre=$hsaPre, hsaPost=$hsaPost, fsaMedical=$fsaMedical, fsaDependentCare=$fsaDependentCare, simpleIra=$simpleIra, simple=$simple, commuter=$commuter, customPostTax=$customPostTax, customPreTax=$customPreTax, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Company.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Company.kt index dbf6c04e..6399dc55 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Company.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Company.kt @@ -440,7 +440,7 @@ private constructor( return true } - return /* spotless:off */ other is AccountType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AccountType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -489,17 +489,14 @@ private constructor( return true } - return /* spotless:off */ other is Account && this.routingNumber == other.routingNumber && this.accountName == other.accountName && this.institutionName == other.institutionName && this.accountType == other.accountType && this.accountNumber == other.accountNumber && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Account && routingNumber == other.routingNumber && accountName == other.accountName && institutionName == other.institutionName && accountType == other.accountType && accountNumber == other.accountNumber && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Account{routingNumber=$routingNumber, accountName=$accountName, institutionName=$institutionName, accountType=$accountType, accountNumber=$accountNumber, additionalProperties=$additionalProperties}" @@ -675,17 +672,14 @@ private constructor( return true } - return /* spotless:off */ other is Parent && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Parent && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Parent{name=$name, additionalProperties=$additionalProperties}" @@ -696,17 +690,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.parent == other.parent && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && parent == other.parent && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, parent, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, parent, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, parent=$parent, additionalProperties=$additionalProperties}" @@ -819,7 +810,7 @@ private constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -882,7 +873,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -961,17 +952,14 @@ private constructor( return true } - return /* spotless:off */ other is Entity && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Entity && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Entity{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -982,17 +970,14 @@ private constructor( return true } - return /* spotless:off */ other is Company && this.id == other.id && this.legalName == other.legalName && this.entity == other.entity && this.primaryEmail == other.primaryEmail && this.primaryPhoneNumber == other.primaryPhoneNumber && this.departments == other.departments && this.ein == other.ein && this.locations == other.locations && this.accounts == other.accounts && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Company && id == other.id && legalName == other.legalName && entity == other.entity && primaryEmail == other.primaryEmail && primaryPhoneNumber == other.primaryPhoneNumber && departments == other.departments && ein == other.ein && locations == other.locations && accounts == other.accounts && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, legalName, entity, primaryEmail, primaryPhoneNumber, departments, ein, locations, accounts, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, legalName, entity, primaryEmail, primaryPhoneNumber, departments, ein, locations, accounts, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Company{id=$id, legalName=$legalName, entity=$entity, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, departments=$departments, ein=$ein, locations=$locations, accounts=$accounts, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt index 8de2a49e..3986bf3b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyBenefit.kt @@ -141,17 +141,14 @@ private constructor( return true } - return /* spotless:off */ other is CompanyBenefit && this.benefitId == other.benefitId && this.type == other.type && this.description == other.description && this.frequency == other.frequency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CompanyBenefit && benefitId == other.benefitId && type == other.type && description == other.description && frequency == other.frequency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(benefitId, type, description, frequency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(benefitId, type, description, frequency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CompanyBenefit{benefitId=$benefitId, type=$type, description=$description, frequency=$frequency, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyEvent.kt index 2b0e6b64..9cf78267 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyEvent.kt @@ -251,17 +251,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{additionalProperties=$additionalProperties}" } @@ -279,7 +276,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -322,17 +319,14 @@ private constructor( return true } - return /* spotless:off */ other is CompanyEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CompanyEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CompanyEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyUpdateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyUpdateResponse.kt index c99d2e39..7cc46c5e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyUpdateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CompanyUpdateResponse.kt @@ -423,7 +423,7 @@ private constructor( return true } - return /* spotless:off */ other is AccountType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AccountType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -472,17 +472,14 @@ private constructor( return true } - return /* spotless:off */ other is Account && this.routingNumber == other.routingNumber && this.accountName == other.accountName && this.institutionName == other.institutionName && this.accountType == other.accountType && this.accountNumber == other.accountNumber && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Account && routingNumber == other.routingNumber && accountName == other.accountName && institutionName == other.institutionName && accountType == other.accountType && accountNumber == other.accountNumber && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Account{routingNumber=$routingNumber, accountName=$accountName, institutionName=$institutionName, accountType=$accountType, accountNumber=$accountNumber, additionalProperties=$additionalProperties}" @@ -658,17 +655,14 @@ private constructor( return true } - return /* spotless:off */ other is Parent && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Parent && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Parent{name=$name, additionalProperties=$additionalProperties}" @@ -679,17 +673,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.parent == other.parent && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && parent == other.parent && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, parent, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, parent, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, parent=$parent, additionalProperties=$additionalProperties}" @@ -802,7 +793,7 @@ private constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -865,7 +856,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -944,17 +935,14 @@ private constructor( return true } - return /* spotless:off */ other is Entity && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Entity && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Entity{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -965,17 +953,14 @@ private constructor( return true } - return /* spotless:off */ other is CompanyUpdateResponse && this.legalName == other.legalName && this.entity == other.entity && this.primaryEmail == other.primaryEmail && this.primaryPhoneNumber == other.primaryPhoneNumber && this.departments == other.departments && this.ein == other.ein && this.locations == other.locations && this.accounts == other.accounts && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CompanyUpdateResponse && legalName == other.legalName && entity == other.entity && primaryEmail == other.primaryEmail && primaryPhoneNumber == other.primaryPhoneNumber && departments == other.departments && ein == other.ein && locations == other.locations && accounts == other.accounts && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(legalName, entity, primaryEmail, primaryPhoneNumber, departments, ein, locations, accounts, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(legalName, entity, primaryEmail, primaryPhoneNumber, departments, ein, locations, accounts, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CompanyUpdateResponse{legalName=$legalName, entity=$entity, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, departments=$departments, ein=$ein, locations=$locations, accounts=$accounts, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt index 11f2bf5f..f11e6122 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionNewParams.kt @@ -54,6 +54,12 @@ constructor( fun sandbox(): Optional = Optional.ofNullable(sandbox) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): ConnectSessionNewBody { return ConnectSessionNewBody( @@ -216,43 +222,19 @@ constructor( return true } - return /* spotless:off */ other is ConnectSessionNewBody && this.customerId == other.customerId && this.customerName == other.customerName && this.products == other.products && this.customerEmail == other.customerEmail && this.integration == other.integration && this.manual == other.manual && this.minutesToExpire == other.minutesToExpire && this.redirectUri == other.redirectUri && this.sandbox == other.sandbox && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ConnectSessionNewBody && customerId == other.customerId && customerName == other.customerName && products == other.products && customerEmail == other.customerEmail && integration == other.integration && manual == other.manual && minutesToExpire == other.minutesToExpire && redirectUri == other.redirectUri && sandbox == other.sandbox && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(customerId, customerName, products, customerEmail, integration, manual, minutesToExpire, redirectUri, sandbox, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(customerId, customerName, products, customerEmail, integration, manual, minutesToExpire, redirectUri, sandbox, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "ConnectSessionNewBody{customerId=$customerId, customerName=$customerName, products=$products, customerEmail=$customerEmail, integration=$integration, manual=$manual, minutesToExpire=$minutesToExpire, redirectUri=$redirectUri, sandbox=$sandbox, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is ConnectSessionNewParams && this.customerId == other.customerId && this.customerName == other.customerName && this.products == other.products && this.customerEmail == other.customerEmail && this.integration == other.integration && this.manual == other.manual && this.minutesToExpire == other.minutesToExpire && this.redirectUri == other.redirectUri && this.sandbox == other.sandbox && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(customerId, customerName, products, customerEmail, integration, manual, minutesToExpire, redirectUri, sandbox, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "ConnectSessionNewParams{customerId=$customerId, customerName=$customerName, products=$products, customerEmail=$customerEmail, integration=$integration, manual=$manual, minutesToExpire=$minutesToExpire, redirectUri=$redirectUri, sandbox=$sandbox, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -278,18 +260,19 @@ constructor( @JvmSynthetic internal fun from(connectSessionNewParams: ConnectSessionNewParams) = apply { - this.customerId = connectSessionNewParams.customerId - this.customerName = connectSessionNewParams.customerName - this.products(connectSessionNewParams.products) - this.customerEmail = connectSessionNewParams.customerEmail - this.integration = connectSessionNewParams.integration - this.manual = connectSessionNewParams.manual - this.minutesToExpire = connectSessionNewParams.minutesToExpire - this.redirectUri = connectSessionNewParams.redirectUri - this.sandbox = connectSessionNewParams.sandbox - additionalHeaders(connectSessionNewParams.additionalHeaders) - additionalQueryParams(connectSessionNewParams.additionalQueryParams) - additionalBodyProperties(connectSessionNewParams.additionalBodyProperties) + customerId = connectSessionNewParams.customerId + customerName = connectSessionNewParams.customerName + products = connectSessionNewParams.products.toMutableList() + customerEmail = connectSessionNewParams.customerEmail + integration = connectSessionNewParams.integration + manual = connectSessionNewParams.manual + minutesToExpire = connectSessionNewParams.minutesToExpire + redirectUri = connectSessionNewParams.redirectUri + sandbox = connectSessionNewParams.sandbox + additionalHeaders = connectSessionNewParams.additionalHeaders.toBuilder() + additionalQueryParams = connectSessionNewParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + connectSessionNewParams.additionalBodyProperties.toMutableMap() } fun customerId(customerId: String) = apply { this.customerId = customerId } @@ -444,7 +427,7 @@ constructor( ConnectSessionNewParams( checkNotNull(customerId) { "`customerId` is required but was not set" }, checkNotNull(customerName) { "`customerName` is required but was not set" }, - checkNotNull(products) { "`products` is required but was not set" }.toImmutable(), + products.toImmutable(), customerEmail, integration, manual, @@ -470,7 +453,7 @@ constructor( return true } - return /* spotless:off */ other is ConnectProducts && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ConnectProducts && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -628,7 +611,7 @@ constructor( return true } - return /* spotless:off */ other is AuthMethod && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AuthMethod && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -689,17 +672,14 @@ constructor( return true } - return /* spotless:off */ other is Integration && this.provider == other.provider && this.authMethod == other.authMethod && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Integration && provider == other.provider && authMethod == other.authMethod && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(provider, authMethod, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(provider, authMethod, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Integration{provider=$provider, authMethod=$authMethod, additionalProperties=$additionalProperties}" @@ -718,7 +698,7 @@ constructor( return true } - return /* spotless:off */ other is Sandbox && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Sandbox && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -761,4 +741,17 @@ constructor( fun asString(): String = _value().asStringOrThrow() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is ConnectSessionNewParams && customerId == other.customerId && customerName == other.customerName && products == other.products && customerEmail == other.customerEmail && integration == other.integration && manual == other.manual && minutesToExpire == other.minutesToExpire && redirectUri == other.redirectUri && sandbox == other.sandbox && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(customerId, customerName, products, customerEmail, integration, manual, minutesToExpire, redirectUri, sandbox, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "ConnectSessionNewParams{customerId=$customerId, customerName=$customerName, products=$products, customerEmail=$customerEmail, integration=$integration, manual=$manual, minutesToExpire=$minutesToExpire, redirectUri=$redirectUri, sandbox=$sandbox, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt index b7430d3d..cc61aad6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParams.kt @@ -39,6 +39,12 @@ constructor( fun redirectUri(): Optional = Optional.ofNullable(redirectUri) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): ConnectSessionReauthenticateBody { return ConnectSessionReauthenticateBody( @@ -158,43 +164,19 @@ constructor( return true } - return /* spotless:off */ other is ConnectSessionReauthenticateBody && this.connectionId == other.connectionId && this.minutesToExpire == other.minutesToExpire && this.products == other.products && this.redirectUri == other.redirectUri && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ConnectSessionReauthenticateBody && connectionId == other.connectionId && minutesToExpire == other.minutesToExpire && products == other.products && redirectUri == other.redirectUri && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, minutesToExpire, products, redirectUri, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, minutesToExpire, products, redirectUri, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "ConnectSessionReauthenticateBody{connectionId=$connectionId, minutesToExpire=$minutesToExpire, products=$products, redirectUri=$redirectUri, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is ConnectSessionReauthenticateParams && this.connectionId == other.connectionId && this.minutesToExpire == other.minutesToExpire && this.products == other.products && this.redirectUri == other.redirectUri && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(connectionId, minutesToExpire, products, redirectUri, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "ConnectSessionReauthenticateParams{connectionId=$connectionId, minutesToExpire=$minutesToExpire, products=$products, redirectUri=$redirectUri, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -216,15 +198,16 @@ constructor( @JvmSynthetic internal fun from(connectSessionReauthenticateParams: ConnectSessionReauthenticateParams) = apply { - this.connectionId = connectSessionReauthenticateParams.connectionId - this.minutesToExpire = connectSessionReauthenticateParams.minutesToExpire - this.products(connectSessionReauthenticateParams.products ?: listOf()) - this.redirectUri = connectSessionReauthenticateParams.redirectUri - additionalHeaders(connectSessionReauthenticateParams.additionalHeaders) - additionalQueryParams(connectSessionReauthenticateParams.additionalQueryParams) - additionalBodyProperties( - connectSessionReauthenticateParams.additionalBodyProperties - ) + connectionId = connectSessionReauthenticateParams.connectionId + minutesToExpire = connectSessionReauthenticateParams.minutesToExpire + products = + connectSessionReauthenticateParams.products?.toMutableList() ?: mutableListOf() + redirectUri = connectSessionReauthenticateParams.redirectUri + additionalHeaders = connectSessionReauthenticateParams.additionalHeaders.toBuilder() + additionalQueryParams = + connectSessionReauthenticateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + connectSessionReauthenticateParams.additionalBodyProperties.toMutableMap() } /** The ID of the existing connection to reauthenticate */ @@ -373,7 +356,7 @@ constructor( ConnectSessionReauthenticateParams( checkNotNull(connectionId) { "`connectionId` is required but was not set" }, minutesToExpire, - if (products.size == 0) null else products.toImmutable(), + products.toImmutable().ifEmpty { null }, redirectUri, additionalHeaders.build(), additionalQueryParams.build(), @@ -394,7 +377,7 @@ constructor( return true } - return /* spotless:off */ other is ConnectProducts && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ConnectProducts && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -473,4 +456,17 @@ constructor( fun asString(): String = _value().asStringOrThrow() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is ConnectSessionReauthenticateParams && connectionId == other.connectionId && minutesToExpire == other.minutesToExpire && products == other.products && redirectUri == other.redirectUri && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(connectionId, minutesToExpire, products, redirectUri, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "ConnectSessionReauthenticateParams{connectionId=$connectionId, minutesToExpire=$minutesToExpire, products=$products, redirectUri=$redirectUri, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionCreateResponse.kt index 400b4517..22109b19 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionCreateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionCreateResponse.kt @@ -214,7 +214,7 @@ private constructor( return true } - return /* spotless:off */ other is AuthenticationType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AuthenticationType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -275,17 +275,14 @@ private constructor( return true } - return /* spotless:off */ other is ConnectionCreateResponse && this.connectionId == other.connectionId && this.companyId == other.companyId && this.providerId == other.providerId && this.accountId == other.accountId && this.authenticationType == other.authenticationType && this.products == other.products && this.accessToken == other.accessToken && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ConnectionCreateResponse && connectionId == other.connectionId && companyId == other.companyId && providerId == other.providerId && accountId == other.accountId && authenticationType == other.authenticationType && products == other.products && accessToken == other.accessToken && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, providerId, accountId, authenticationType, products, accessToken, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, providerId, accountId, authenticationType, products, accessToken, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "ConnectionCreateResponse{connectionId=$connectionId, companyId=$companyId, providerId=$providerId, accountId=$accountId, authenticationType=$authenticationType, products=$products, accessToken=$accessToken, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionStatusType.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionStatusType.kt index 3adf9c3e..253106a4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionStatusType.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ConnectionStatusType.kt @@ -21,7 +21,7 @@ private constructor( return true } - return /* spotless:off */ other is ConnectionStatusType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ConnectionStatusType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateAccessTokenResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateAccessTokenResponse.kt index cbcb78e0..afefcfed 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateAccessTokenResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateAccessTokenResponse.kt @@ -298,7 +298,7 @@ private constructor( return true } - return /* spotless:off */ other is ClientType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ClientType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -361,7 +361,7 @@ private constructor( return true } - return /* spotless:off */ other is ConnectionType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ConnectionType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -410,17 +410,14 @@ private constructor( return true } - return /* spotless:off */ other is CreateAccessTokenResponse && this.accessToken == other.accessToken && this.connectionId == other.connectionId && this.customerId == other.customerId && this.accountId == other.accountId && this.clientType == other.clientType && this.companyId == other.companyId && this.connectionType == other.connectionType && this.products == other.products && this.providerId == other.providerId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CreateAccessTokenResponse && accessToken == other.accessToken && connectionId == other.connectionId && customerId == other.customerId && accountId == other.accountId && clientType == other.clientType && companyId == other.companyId && connectionType == other.connectionType && products == other.products && providerId == other.providerId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(accessToken, connectionId, customerId, accountId, clientType, companyId, connectionType, products, providerId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(accessToken, connectionId, customerId, accountId, clientType, companyId, connectionType, products, providerId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CreateAccessTokenResponse{accessToken=$accessToken, connectionId=$connectionId, customerId=$customerId, accountId=$accountId, clientType=$clientType, companyId=$companyId, connectionType=$connectionType, products=$products, providerId=$providerId, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateCompanyBenefitsResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateCompanyBenefitsResponse.kt index 7a811c21..9358a950 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateCompanyBenefitsResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/CreateCompanyBenefitsResponse.kt @@ -86,17 +86,14 @@ private constructor( return true } - return /* spotless:off */ other is CreateCompanyBenefitsResponse && this.benefitId == other.benefitId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CreateCompanyBenefitsResponse && benefitId == other.benefitId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(benefitId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(benefitId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CreateCompanyBenefitsResponse{benefitId=$benefitId, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DirectoryEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DirectoryEvent.kt index fc405b26..ec17e3fc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DirectoryEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DirectoryEvent.kt @@ -272,17 +272,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{individualId=$individualId, additionalProperties=$additionalProperties}" @@ -301,7 +298,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -356,17 +353,14 @@ private constructor( return true } - return /* spotless:off */ other is DirectoryEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is DirectoryEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "DirectoryEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DisconnectResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DisconnectResponse.kt index b4c8f7ba..7485b444 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DisconnectResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/DisconnectResponse.kt @@ -90,17 +90,14 @@ private constructor( return true } - return /* spotless:off */ other is DisconnectResponse && this.status == other.status && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is DisconnectResponse && status == other.status && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(status, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(status, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "DisconnectResponse{status=$status, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt index 2eaef93f..dda7c866 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentData.kt @@ -541,17 +541,14 @@ private constructor( return true } - return /* spotless:off */ other is CustomField && this.name == other.name && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CustomField && name == other.name && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CustomField{name=$name, value=$value, additionalProperties=$additionalProperties}" @@ -633,17 +630,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -768,7 +762,7 @@ private constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -849,7 +843,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -898,17 +892,14 @@ private constructor( return true } - return /* spotless:off */ other is Employment && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Employment && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Employment{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -990,17 +981,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" } @@ -1010,17 +998,14 @@ private constructor( return true } - return /* spotless:off */ other is EmploymentData && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.title == other.title && this.manager == other.manager && this.department == other.department && this.employment == other.employment && this.startDate == other.startDate && this.endDate == other.endDate && this.latestRehireDate == other.latestRehireDate && this.isActive == other.isActive && this.classCode == other.classCode && this.location == other.location && this.income == other.income && this.incomeHistory == other.incomeHistory && this.customFields == other.customFields && this.sourceId == other.sourceId && this.workId == other.workId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmploymentData && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && title == other.title && manager == other.manager && department == other.department && employment == other.employment && startDate == other.startDate && endDate == other.endDate && latestRehireDate == other.latestRehireDate && isActive == other.isActive && classCode == other.classCode && location == other.location && income == other.income && incomeHistory == other.incomeHistory && customFields == other.customFields && sourceId == other.sourceId && workId == other.workId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, title, manager, department, employment, startDate, endDate, latestRehireDate, isActive, classCode, location, income, incomeHistory, customFields, sourceId, workId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, title, manager, department, employment, startDate, endDate, latestRehireDate, isActive, classCode, location, income, incomeHistory, customFields, sourceId, workId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmploymentData{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, title=$title, manager=$manager, department=$department, employment=$employment, startDate=$startDate, endDate=$endDate, latestRehireDate=$latestRehireDate, isActive=$isActive, classCode=$classCode, location=$location, income=$income, incomeHistory=$incomeHistory, customFields=$customFields, sourceId=$sourceId, workId=$workId, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentDataResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentDataResponse.kt index d72b16a6..9b7bbd53 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentDataResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentDataResponse.kt @@ -123,17 +123,14 @@ private constructor( return true } - return /* spotless:off */ other is EmploymentDataResponse && this.individualId == other.individualId && this.code == other.code && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmploymentDataResponse && individualId == other.individualId && code == other.code && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, code, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, code, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmploymentDataResponse{individualId=$individualId, code=$code, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentEvent.kt index 078688da..2bab196a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentEvent.kt @@ -272,17 +272,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{individualId=$individualId, additionalProperties=$additionalProperties}" @@ -301,7 +298,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -356,17 +353,14 @@ private constructor( return true } - return /* spotless:off */ other is EmploymentEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmploymentEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmploymentEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentUpdateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentUpdateResponse.kt index 9a894abc..9a68fa76 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentUpdateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EmploymentUpdateResponse.kt @@ -522,17 +522,14 @@ private constructor( return true } - return /* spotless:off */ other is CustomField && this.name == other.name && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CustomField && name == other.name && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CustomField{name=$name, value=$value, additionalProperties=$additionalProperties}" @@ -614,17 +611,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -749,7 +743,7 @@ private constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -830,7 +824,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -879,17 +873,14 @@ private constructor( return true } - return /* spotless:off */ other is Employment && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Employment && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Employment{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -971,17 +962,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" } @@ -991,17 +979,14 @@ private constructor( return true } - return /* spotless:off */ other is EmploymentUpdateResponse && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.title == other.title && this.manager == other.manager && this.department == other.department && this.employment == other.employment && this.startDate == other.startDate && this.endDate == other.endDate && this.latestRehireDate == other.latestRehireDate && this.isActive == other.isActive && this.classCode == other.classCode && this.location == other.location && this.income == other.income && this.incomeHistory == other.incomeHistory && this.customFields == other.customFields && this.sourceId == other.sourceId && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmploymentUpdateResponse && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && title == other.title && manager == other.manager && department == other.department && employment == other.employment && startDate == other.startDate && endDate == other.endDate && latestRehireDate == other.latestRehireDate && isActive == other.isActive && classCode == other.classCode && location == other.location && income == other.income && incomeHistory == other.incomeHistory && customFields == other.customFields && sourceId == other.sourceId && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(firstName, middleName, lastName, title, manager, department, employment, startDate, endDate, latestRehireDate, isActive, classCode, location, income, incomeHistory, customFields, sourceId, id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(firstName, middleName, lastName, title, manager, department, employment, startDate, endDate, latestRehireDate, isActive, classCode, location, income, incomeHistory, customFields, sourceId, id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmploymentUpdateResponse{firstName=$firstName, middleName=$middleName, lastName=$lastName, title=$title, manager=$manager, department=$department, employment=$employment, startDate=$startDate, endDate=$endDate, latestRehireDate=$latestRehireDate, isActive=$isActive, classCode=$classCode, location=$location, income=$income, incomeHistory=$incomeHistory, customFields=$customFields, sourceId=$sourceId, id=$id, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EnrolledIndividual.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EnrolledIndividual.kt index a7d4ca39..c2b0cf42 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EnrolledIndividual.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/EnrolledIndividual.kt @@ -242,17 +242,14 @@ private constructor( return true } - return /* spotless:off */ other is Body && this.name == other.name && this.finchCode == other.finchCode && this.message == other.message && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Body && name == other.name && finchCode == other.finchCode && message == other.message && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, finchCode, message, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, finchCode, message, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Body{name=$name, finchCode=$finchCode, message=$message, additionalProperties=$additionalProperties}" @@ -271,7 +268,7 @@ private constructor( return true } - return /* spotless:off */ other is Code && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Code && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -332,17 +329,14 @@ private constructor( return true } - return /* spotless:off */ other is EnrolledIndividual && this.individualId == other.individualId && this.code == other.code && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EnrolledIndividual && individualId == other.individualId && code == other.code && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, code, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, code, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EnrolledIndividual{individualId=$individualId, code=$code, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt index c1034c66..1790e378 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitCreateParams.kt @@ -32,6 +32,12 @@ constructor( fun type(): Optional = Optional.ofNullable(type) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): HrisBenefitCreateBody { return HrisBenefitCreateBody( @@ -135,43 +141,19 @@ constructor( return true } - return /* spotless:off */ other is HrisBenefitCreateBody && this.description == other.description && this.frequency == other.frequency && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is HrisBenefitCreateBody && description == other.description && frequency == other.frequency && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(description, frequency, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(description, frequency, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "HrisBenefitCreateBody{description=$description, frequency=$frequency, type=$type, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitCreateParams && this.description == other.description && this.frequency == other.frequency && this.type == other.type && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(description, frequency, type, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "HrisBenefitCreateParams{description=$description, frequency=$frequency, type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -191,12 +173,13 @@ constructor( @JvmSynthetic internal fun from(hrisBenefitCreateParams: HrisBenefitCreateParams) = apply { - this.description = hrisBenefitCreateParams.description - this.frequency = hrisBenefitCreateParams.frequency - this.type = hrisBenefitCreateParams.type - additionalHeaders(hrisBenefitCreateParams.additionalHeaders) - additionalQueryParams(hrisBenefitCreateParams.additionalQueryParams) - additionalBodyProperties(hrisBenefitCreateParams.additionalBodyProperties) + description = hrisBenefitCreateParams.description + frequency = hrisBenefitCreateParams.frequency + type = hrisBenefitCreateParams.type + additionalHeaders = hrisBenefitCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisBenefitCreateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + hrisBenefitCreateParams.additionalBodyProperties.toMutableMap() } /** @@ -340,4 +323,17 @@ constructor( additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitCreateParams && description == other.description && frequency == other.frequency && type == other.type && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(description, frequency, type, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "HrisBenefitCreateParams{description=$description, frequency=$frequency, type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt index edb85176..69e5e18b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualEnrolledIdsParams.kt @@ -17,6 +17,10 @@ constructor( fun benefitId(): String = benefitId + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams @@ -28,25 +32,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitIndividualEnrolledIdsParams && this.benefitId == other.benefitId && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitId, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "HrisBenefitIndividualEnrolledIdsParams{benefitId=$benefitId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -65,9 +50,10 @@ constructor( internal fun from( hrisBenefitIndividualEnrolledIdsParams: HrisBenefitIndividualEnrolledIdsParams ) = apply { - this.benefitId = hrisBenefitIndividualEnrolledIdsParams.benefitId - additionalHeaders(hrisBenefitIndividualEnrolledIdsParams.additionalHeaders) - additionalQueryParams(hrisBenefitIndividualEnrolledIdsParams.additionalQueryParams) + benefitId = hrisBenefitIndividualEnrolledIdsParams.benefitId + additionalHeaders = hrisBenefitIndividualEnrolledIdsParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisBenefitIndividualEnrolledIdsParams.additionalQueryParams.toBuilder() } fun benefitId(benefitId: String) = apply { this.benefitId = benefitId } @@ -177,4 +163,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitIndividualEnrolledIdsParams && benefitId == other.benefitId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitId, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisBenefitIndividualEnrolledIdsParams{benefitId=$benefitId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt index 4e1a8ec6..9cfaf1e0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitIndividualRetrieveManyBenefitsPage && this.individualsService == other.individualsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitIndividualRetrieveManyBenefitsPage && individualsService == other.individualsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitIndividualRetrieveManyBenefitsPage{individualsService=$individualsService, params=$params, response=$response}" @@ -106,15 +104,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitIndividualRetrieveManyBenefitsPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt index cdbdb4ce..17c53431 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitIndividualRetrieveManyBenefitsPageAsync && this.individualsService == other.individualsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitIndividualRetrieveManyBenefitsPageAsync && individualsService == other.individualsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitIndividualRetrieveManyBenefitsPageAsync{individualsService=$individualsService, params=$params, response=$response}" @@ -110,15 +108,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitIndividualRetrieveManyBenefitsPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt index debf4ab5..9e129990 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualRetrieveManyBenefitsParams.kt @@ -21,6 +21,10 @@ constructor( fun individualIds(): Optional = Optional.ofNullable(individualIds) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic @@ -38,25 +42,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitIndividualRetrieveManyBenefitsParams && this.benefitId == other.benefitId && this.individualIds == other.individualIds && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitId, individualIds, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "HrisBenefitIndividualRetrieveManyBenefitsParams{benefitId=$benefitId, individualIds=$individualIds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -77,12 +62,12 @@ constructor( hrisBenefitIndividualRetrieveManyBenefitsParams: HrisBenefitIndividualRetrieveManyBenefitsParams ) = apply { - this.benefitId = hrisBenefitIndividualRetrieveManyBenefitsParams.benefitId - this.individualIds = hrisBenefitIndividualRetrieveManyBenefitsParams.individualIds - additionalHeaders(hrisBenefitIndividualRetrieveManyBenefitsParams.additionalHeaders) - additionalQueryParams( - hrisBenefitIndividualRetrieveManyBenefitsParams.additionalQueryParams - ) + benefitId = hrisBenefitIndividualRetrieveManyBenefitsParams.benefitId + individualIds = hrisBenefitIndividualRetrieveManyBenefitsParams.individualIds + additionalHeaders = + hrisBenefitIndividualRetrieveManyBenefitsParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisBenefitIndividualRetrieveManyBenefitsParams.additionalQueryParams.toBuilder() } fun benefitId(benefitId: String) = apply { this.benefitId = benefitId } @@ -199,4 +184,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitIndividualRetrieveManyBenefitsParams && benefitId == other.benefitId && individualIds == other.individualIds && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitId, individualIds, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisBenefitIndividualRetrieveManyBenefitsParams{benefitId=$benefitId, individualIds=$individualIds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPage.kt index 7bbe12a5..0fa3731d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyPage && this.individualsService == other.individualsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyPage && individualsService == other.individualsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitIndividualUnenrollManyPage{individualsService=$individualsService, params=$params, response=$response}" @@ -106,15 +104,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitIndividualUnenrollManyPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPageAsync.kt index 36fa5d5f..922e047c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyPageAsync && this.individualsService == other.individualsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyPageAsync && individualsService == other.individualsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitIndividualUnenrollManyPageAsync{individualsService=$individualsService, params=$params, response=$response}" @@ -109,15 +107,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitIndividualUnenrollManyPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt index 4ec32afa..1b3b20b8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyParams.kt @@ -29,6 +29,12 @@ constructor( fun individualIds(): Optional> = Optional.ofNullable(individualIds) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): HrisBenefitIndividualUnenrollManyBody { return HrisBenefitIndividualUnenrollManyBody(individualIds, additionalBodyProperties) @@ -112,43 +118,19 @@ constructor( return true } - return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyBody && this.individualIds == other.individualIds && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyBody && individualIds == other.individualIds && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualIds, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualIds, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "HrisBenefitIndividualUnenrollManyBody{individualIds=$individualIds, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyParams && this.benefitId == other.benefitId && this.individualIds == other.individualIds && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitId, individualIds, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "HrisBenefitIndividualUnenrollManyParams{benefitId=$benefitId, individualIds=$individualIds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -169,13 +151,16 @@ constructor( internal fun from( hrisBenefitIndividualUnenrollManyParams: HrisBenefitIndividualUnenrollManyParams ) = apply { - this.benefitId = hrisBenefitIndividualUnenrollManyParams.benefitId - this.individualIds(hrisBenefitIndividualUnenrollManyParams.individualIds ?: listOf()) - additionalHeaders(hrisBenefitIndividualUnenrollManyParams.additionalHeaders) - additionalQueryParams(hrisBenefitIndividualUnenrollManyParams.additionalQueryParams) - additionalBodyProperties( - hrisBenefitIndividualUnenrollManyParams.additionalBodyProperties - ) + benefitId = hrisBenefitIndividualUnenrollManyParams.benefitId + individualIds = + hrisBenefitIndividualUnenrollManyParams.individualIds?.toMutableList() + ?: mutableListOf() + additionalHeaders = + hrisBenefitIndividualUnenrollManyParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisBenefitIndividualUnenrollManyParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + hrisBenefitIndividualUnenrollManyParams.additionalBodyProperties.toMutableMap() } fun benefitId(benefitId: String) = apply { this.benefitId = benefitId } @@ -312,10 +297,23 @@ constructor( fun build(): HrisBenefitIndividualUnenrollManyParams = HrisBenefitIndividualUnenrollManyParams( checkNotNull(benefitId) { "`benefitId` is required but was not set" }, - if (individualIds.size == 0) null else individualIds.toImmutable(), + individualIds.toImmutable().ifEmpty { null }, additionalHeaders.build(), additionalQueryParams.build(), additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitIndividualUnenrollManyParams && benefitId == other.benefitId && individualIds == other.individualIds && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitId, individualIds, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "HrisBenefitIndividualUnenrollManyParams{benefitId=$benefitId, individualIds=$individualIds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt index b03f584e..56ba5279 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitListPage && this.benefitsService == other.benefitsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitListPage && benefitsService == other.benefitsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitListPage{benefitsService=$benefitsService, params=$params, response=$response}" @@ -102,15 +100,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitListPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt index 2895e47a..2e7db706 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitListPageAsync && this.benefitsService == other.benefitsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitListPageAsync && benefitsService == other.benefitsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitListPageAsync{benefitsService=$benefitsService, params=$params, response=$response}" @@ -109,15 +107,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitListPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt index ce5a88d9..a253da32 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListParams.kt @@ -14,28 +14,13 @@ constructor( private val additionalQueryParams: QueryParams, ) { - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitListParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "HrisBenefitListParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -52,8 +37,8 @@ constructor( @JvmSynthetic internal fun from(hrisBenefitListParams: HrisBenefitListParams) = apply { - additionalHeaders(hrisBenefitListParams.additionalHeaders) - additionalQueryParams(hrisBenefitListParams.additionalQueryParams) + additionalHeaders = hrisBenefitListParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisBenefitListParams.additionalQueryParams.toBuilder() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -157,4 +142,17 @@ constructor( fun build(): HrisBenefitListParams = HrisBenefitListParams(additionalHeaders.build(), additionalQueryParams.build()) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitListParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisBenefitListParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt index 13cd1458..07a10a48 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitListSupportedBenefitsPage && this.benefitsService == other.benefitsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitListSupportedBenefitsPage && benefitsService == other.benefitsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitListSupportedBenefitsPage{benefitsService=$benefitsService, params=$params, response=$response}" @@ -106,15 +104,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitListSupportedBenefitsPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt index ce5114f3..6871d84a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisBenefitListSupportedBenefitsPageAsync && this.benefitsService == other.benefitsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisBenefitListSupportedBenefitsPageAsync && benefitsService == other.benefitsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitsService, params, response) /* spotless:on */ override fun toString() = "HrisBenefitListSupportedBenefitsPageAsync{benefitsService=$benefitsService, params=$params, response=$response}" @@ -109,15 +107,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisBenefitListSupportedBenefitsPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt index 45f61e59..8b0db972 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitListSupportedBenefitsParams.kt @@ -14,28 +14,13 @@ constructor( private val additionalQueryParams: QueryParams, ) { - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitListSupportedBenefitsParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "HrisBenefitListSupportedBenefitsParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -54,8 +39,9 @@ constructor( internal fun from( hrisBenefitListSupportedBenefitsParams: HrisBenefitListSupportedBenefitsParams ) = apply { - additionalHeaders(hrisBenefitListSupportedBenefitsParams.additionalHeaders) - additionalQueryParams(hrisBenefitListSupportedBenefitsParams.additionalQueryParams) + additionalHeaders = hrisBenefitListSupportedBenefitsParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisBenefitListSupportedBenefitsParams.additionalQueryParams.toBuilder() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -162,4 +148,17 @@ constructor( additionalQueryParams.build() ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitListSupportedBenefitsParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisBenefitListSupportedBenefitsParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt index 3ee04260..52e390f2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitRetrieveParams.kt @@ -17,6 +17,10 @@ constructor( fun benefitId(): String = benefitId + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams @@ -28,25 +32,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitRetrieveParams && this.benefitId == other.benefitId && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitId, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "HrisBenefitRetrieveParams{benefitId=$benefitId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -63,9 +48,9 @@ constructor( @JvmSynthetic internal fun from(hrisBenefitRetrieveParams: HrisBenefitRetrieveParams) = apply { - this.benefitId = hrisBenefitRetrieveParams.benefitId - additionalHeaders(hrisBenefitRetrieveParams.additionalHeaders) - additionalQueryParams(hrisBenefitRetrieveParams.additionalQueryParams) + benefitId = hrisBenefitRetrieveParams.benefitId + additionalHeaders = hrisBenefitRetrieveParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisBenefitRetrieveParams.additionalQueryParams.toBuilder() } fun benefitId(benefitId: String) = apply { this.benefitId = benefitId } @@ -175,4 +160,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitRetrieveParams && benefitId == other.benefitId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitId, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisBenefitRetrieveParams{benefitId=$benefitId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt index 6d94892e..36fb1cf9 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitUpdateParams.kt @@ -29,6 +29,12 @@ constructor( fun description(): Optional = Optional.ofNullable(description) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): HrisBenefitUpdateBody { return HrisBenefitUpdateBody(description, additionalBodyProperties) @@ -105,43 +111,19 @@ constructor( return true } - return /* spotless:off */ other is HrisBenefitUpdateBody && this.description == other.description && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is HrisBenefitUpdateBody && description == other.description && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(description, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(description, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "HrisBenefitUpdateBody{description=$description, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisBenefitUpdateParams && this.benefitId == other.benefitId && this.description == other.description && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(benefitId, description, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "HrisBenefitUpdateParams{benefitId=$benefitId, description=$description, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -160,11 +142,12 @@ constructor( @JvmSynthetic internal fun from(hrisBenefitUpdateParams: HrisBenefitUpdateParams) = apply { - this.benefitId = hrisBenefitUpdateParams.benefitId - this.description = hrisBenefitUpdateParams.description - additionalHeaders(hrisBenefitUpdateParams.additionalHeaders) - additionalQueryParams(hrisBenefitUpdateParams.additionalQueryParams) - additionalBodyProperties(hrisBenefitUpdateParams.additionalBodyProperties) + benefitId = hrisBenefitUpdateParams.benefitId + description = hrisBenefitUpdateParams.description + additionalHeaders = hrisBenefitUpdateParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisBenefitUpdateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + hrisBenefitUpdateParams.additionalBodyProperties.toMutableMap() } fun benefitId(benefitId: String) = apply { this.benefitId = benefitId } @@ -301,4 +284,17 @@ constructor( additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisBenefitUpdateParams && benefitId == other.benefitId && description == other.description && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(benefitId, description, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "HrisBenefitUpdateParams{benefitId=$benefitId, description=$description, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt index b480dc66..b04ee9a6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisCompanyRetrieveParams.kt @@ -14,28 +14,13 @@ constructor( private val additionalQueryParams: QueryParams, ) { - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisCompanyRetrieveParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "HrisCompanyRetrieveParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -52,8 +37,8 @@ constructor( @JvmSynthetic internal fun from(hrisCompanyRetrieveParams: HrisCompanyRetrieveParams) = apply { - additionalHeaders(hrisCompanyRetrieveParams.additionalHeaders) - additionalQueryParams(hrisCompanyRetrieveParams.additionalQueryParams) + additionalHeaders = hrisCompanyRetrieveParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisCompanyRetrieveParams.additionalQueryParams.toBuilder() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -157,4 +142,17 @@ constructor( fun build(): HrisCompanyRetrieveParams = HrisCompanyRetrieveParams(additionalHeaders.build(), additionalQueryParams.build()) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisCompanyRetrieveParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisCompanyRetrieveParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt index ed67cc3a..06a17fa0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPage.kt @@ -36,12 +36,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisDirectoryListIndividualsPage && this.directoryService == other.directoryService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisDirectoryListIndividualsPage && directoryService == other.directoryService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ override fun toString() = "HrisDirectoryListIndividualsPage{directoryService=$directoryService, params=$params, response=$response}" @@ -132,15 +130,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.individuals == other.individuals && this.paging == other.paging && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && individuals == other.individuals && paging == other.paging && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ override fun toString() = - "HrisDirectoryListIndividualsPage.Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" + "Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt index 360b0107..b5ea48eb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsPageAsync.kt @@ -37,12 +37,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisDirectoryListIndividualsPageAsync && this.directoryService == other.directoryService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisDirectoryListIndividualsPageAsync && directoryService == other.directoryService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ override fun toString() = "HrisDirectoryListIndividualsPageAsync{directoryService=$directoryService, params=$params, response=$response}" @@ -135,15 +133,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.individuals == other.individuals && this.paging == other.paging && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && individuals == other.individuals && paging == other.paging && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ override fun toString() = - "HrisDirectoryListIndividualsPageAsync.Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" + "Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt index 195dee22..7ee0d705 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParams.kt @@ -21,6 +21,10 @@ constructor( fun offset(): Optional = Optional.ofNullable(offset) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic @@ -32,25 +36,6 @@ constructor( return queryParams.build() } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisDirectoryListIndividualsParams && this.limit == other.limit && this.offset == other.offset && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(limit, offset, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "HrisDirectoryListIndividualsParams{limit=$limit, offset=$offset, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -69,10 +54,11 @@ constructor( @JvmSynthetic internal fun from(hrisDirectoryListIndividualsParams: HrisDirectoryListIndividualsParams) = apply { - this.limit = hrisDirectoryListIndividualsParams.limit - this.offset = hrisDirectoryListIndividualsParams.offset - additionalHeaders(hrisDirectoryListIndividualsParams.additionalHeaders) - additionalQueryParams(hrisDirectoryListIndividualsParams.additionalQueryParams) + limit = hrisDirectoryListIndividualsParams.limit + offset = hrisDirectoryListIndividualsParams.offset + additionalHeaders = hrisDirectoryListIndividualsParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisDirectoryListIndividualsParams.additionalQueryParams.toBuilder() } /** Number of employees to return (defaults to all) */ @@ -187,4 +173,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisDirectoryListIndividualsParams && limit == other.limit && offset == other.offset && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(limit, offset, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisDirectoryListIndividualsParams{limit=$limit, offset=$offset, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt index 1f4d7af4..cb1901ea 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPage.kt @@ -36,12 +36,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisDirectoryListPage && this.directoryService == other.directoryService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisDirectoryListPage && directoryService == other.directoryService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ override fun toString() = "HrisDirectoryListPage{directoryService=$directoryService, params=$params, response=$response}" @@ -131,15 +129,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.individuals == other.individuals && this.paging == other.paging && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && individuals == other.individuals && paging == other.paging && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ override fun toString() = - "HrisDirectoryListPage.Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" + "Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt index bfb85b0a..4177505f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListPageAsync.kt @@ -37,12 +37,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisDirectoryListPageAsync && this.directoryService == other.directoryService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisDirectoryListPageAsync && directoryService == other.directoryService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(directoryService, params, response) /* spotless:on */ override fun toString() = "HrisDirectoryListPageAsync{directoryService=$directoryService, params=$params, response=$response}" @@ -134,15 +132,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.individuals == other.individuals && this.paging == other.paging && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && individuals == other.individuals && paging == other.paging && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individuals, paging, additionalProperties) /* spotless:on */ override fun toString() = - "HrisDirectoryListPageAsync.Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" + "Response{individuals=$individuals, paging=$paging, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt index ea490261..0912e775 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisDirectoryListParams.kt @@ -21,6 +21,10 @@ constructor( fun offset(): Optional = Optional.ofNullable(offset) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic @@ -32,25 +36,6 @@ constructor( return queryParams.build() } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisDirectoryListParams && this.limit == other.limit && this.offset == other.offset && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(limit, offset, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "HrisDirectoryListParams{limit=$limit, offset=$offset, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -68,10 +53,10 @@ constructor( @JvmSynthetic internal fun from(hrisDirectoryListParams: HrisDirectoryListParams) = apply { - this.limit = hrisDirectoryListParams.limit - this.offset = hrisDirectoryListParams.offset - additionalHeaders(hrisDirectoryListParams.additionalHeaders) - additionalQueryParams(hrisDirectoryListParams.additionalQueryParams) + limit = hrisDirectoryListParams.limit + offset = hrisDirectoryListParams.offset + additionalHeaders = hrisDirectoryListParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisDirectoryListParams.additionalQueryParams.toBuilder() } /** Number of employees to return (defaults to all) */ @@ -186,4 +171,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisDirectoryListParams && limit == other.limit && offset == other.offset && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(limit, offset, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisDirectoryListParams{limit=$limit, offset=$offset, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt index 1a304f3c..bf9ca300 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisEmploymentRetrieveManyPage && this.employmentsService == other.employmentsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisEmploymentRetrieveManyPage && employmentsService == other.employmentsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(employmentsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(employmentsService, params, response) /* spotless:on */ override fun toString() = "HrisEmploymentRetrieveManyPage{employmentsService=$employmentsService, params=$params, response=$response}" @@ -108,15 +106,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.responses == other.responses && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && responses == other.responses && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ override fun toString() = - "HrisEmploymentRetrieveManyPage.Response{responses=$responses, additionalProperties=$additionalProperties}" + "Response{responses=$responses, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt index 12322335..a6e2e991 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisEmploymentRetrieveManyPageAsync && this.employmentsService == other.employmentsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisEmploymentRetrieveManyPageAsync && employmentsService == other.employmentsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(employmentsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(employmentsService, params, response) /* spotless:on */ override fun toString() = "HrisEmploymentRetrieveManyPageAsync{employmentsService=$employmentsService, params=$params, response=$response}" @@ -111,15 +109,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.responses == other.responses && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && responses == other.responses && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ override fun toString() = - "HrisEmploymentRetrieveManyPageAsync.Response{responses=$responses, additionalProperties=$additionalProperties}" + "Response{responses=$responses, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt index ab88445a..0d40d3c8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisEmploymentRetrieveManyParams.kt @@ -25,6 +25,12 @@ constructor( fun requests(): List = requests + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): HrisEmploymentRetrieveManyBody { return HrisEmploymentRetrieveManyBody(requests, additionalBodyProperties) @@ -100,43 +106,19 @@ constructor( return true } - return /* spotless:off */ other is HrisEmploymentRetrieveManyBody && this.requests == other.requests && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is HrisEmploymentRetrieveManyBody && requests == other.requests && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(requests, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(requests, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "HrisEmploymentRetrieveManyBody{requests=$requests, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisEmploymentRetrieveManyParams && this.requests == other.requests && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(requests, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "HrisEmploymentRetrieveManyParams{requests=$requests, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -155,10 +137,12 @@ constructor( @JvmSynthetic internal fun from(hrisEmploymentRetrieveManyParams: HrisEmploymentRetrieveManyParams) = apply { - this.requests(hrisEmploymentRetrieveManyParams.requests) - additionalHeaders(hrisEmploymentRetrieveManyParams.additionalHeaders) - additionalQueryParams(hrisEmploymentRetrieveManyParams.additionalQueryParams) - additionalBodyProperties(hrisEmploymentRetrieveManyParams.additionalBodyProperties) + requests = hrisEmploymentRetrieveManyParams.requests.toMutableList() + additionalHeaders = hrisEmploymentRetrieveManyParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisEmploymentRetrieveManyParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + hrisEmploymentRetrieveManyParams.additionalBodyProperties.toMutableMap() } /** The array of batch requests. */ @@ -292,7 +276,7 @@ constructor( fun build(): HrisEmploymentRetrieveManyParams = HrisEmploymentRetrieveManyParams( - checkNotNull(requests) { "`requests` is required but was not set" }.toImmutable(), + requests.toImmutable(), additionalHeaders.build(), additionalQueryParams.build(), additionalBodyProperties.toImmutable(), @@ -370,19 +354,29 @@ constructor( return true } - return /* spotless:off */ other is Request && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Request && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Request{individualId=$individualId, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisEmploymentRetrieveManyParams && requests == other.requests && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(requests, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "HrisEmploymentRetrieveManyParams{requests=$requests, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt index 464e8029..4207b791 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisIndividualRetrieveManyPage && this.individualsService == other.individualsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisIndividualRetrieveManyPage && individualsService == other.individualsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ override fun toString() = "HrisIndividualRetrieveManyPage{individualsService=$individualsService, params=$params, response=$response}" @@ -107,15 +105,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.responses == other.responses && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && responses == other.responses && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ override fun toString() = - "HrisIndividualRetrieveManyPage.Response{responses=$responses, additionalProperties=$additionalProperties}" + "Response{responses=$responses, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt index ad335346..b78233a3 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisIndividualRetrieveManyPageAsync && this.individualsService == other.individualsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisIndividualRetrieveManyPageAsync && individualsService == other.individualsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualsService, params, response) /* spotless:on */ override fun toString() = "HrisIndividualRetrieveManyPageAsync{individualsService=$individualsService, params=$params, response=$response}" @@ -110,15 +108,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.responses == other.responses && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && responses == other.responses && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ override fun toString() = - "HrisIndividualRetrieveManyPageAsync.Response{responses=$responses, additionalProperties=$additionalProperties}" + "Response{responses=$responses, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt index 5c7c282c..ab7c89bb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisIndividualRetrieveManyParams.kt @@ -29,6 +29,12 @@ constructor( fun requests(): Optional> = Optional.ofNullable(requests) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): HrisIndividualRetrieveManyBody { return HrisIndividualRetrieveManyBody( @@ -113,43 +119,19 @@ constructor( return true } - return /* spotless:off */ other is HrisIndividualRetrieveManyBody && this.options == other.options && this.requests == other.requests && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is HrisIndividualRetrieveManyBody && options == other.options && requests == other.requests && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(options, requests, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(options, requests, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "HrisIndividualRetrieveManyBody{options=$options, requests=$requests, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisIndividualRetrieveManyParams && this.options == other.options && this.requests == other.requests && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(options, requests, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "HrisIndividualRetrieveManyParams{options=$options, requests=$requests, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -169,11 +151,14 @@ constructor( @JvmSynthetic internal fun from(hrisIndividualRetrieveManyParams: HrisIndividualRetrieveManyParams) = apply { - this.options = hrisIndividualRetrieveManyParams.options - this.requests(hrisIndividualRetrieveManyParams.requests ?: listOf()) - additionalHeaders(hrisIndividualRetrieveManyParams.additionalHeaders) - additionalQueryParams(hrisIndividualRetrieveManyParams.additionalQueryParams) - additionalBodyProperties(hrisIndividualRetrieveManyParams.additionalBodyProperties) + options = hrisIndividualRetrieveManyParams.options + requests = + hrisIndividualRetrieveManyParams.requests?.toMutableList() ?: mutableListOf() + additionalHeaders = hrisIndividualRetrieveManyParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisIndividualRetrieveManyParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + hrisIndividualRetrieveManyParams.additionalBodyProperties.toMutableMap() } fun options(options: Options) = apply { this.options = options } @@ -308,7 +293,7 @@ constructor( fun build(): HrisIndividualRetrieveManyParams = HrisIndividualRetrieveManyParams( options, - if (requests.size == 0) null else requests.toImmutable(), + requests.toImmutable().ifEmpty { null }, additionalHeaders.build(), additionalQueryParams.build(), additionalBodyProperties.toImmutable(), @@ -373,17 +358,14 @@ constructor( return true } - return /* spotless:off */ other is Options && this.include == other.include && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Options && include == other.include && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(include, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(include, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Options{include=$include, additionalProperties=$additionalProperties}" @@ -446,19 +428,29 @@ constructor( return true } - return /* spotless:off */ other is Request && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Request && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Request{individualId=$individualId, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisIndividualRetrieveManyParams && options == other.options && requests == other.requests && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(options, requests, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "HrisIndividualRetrieveManyParams{options=$options, requests=$requests, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt index e7219416..55ce79fd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisPayStatementRetrieveManyPage && this.payStatementsService == other.payStatementsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisPayStatementRetrieveManyPage && payStatementsService == other.payStatementsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(payStatementsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(payStatementsService, params, response) /* spotless:on */ override fun toString() = "HrisPayStatementRetrieveManyPage{payStatementsService=$payStatementsService, params=$params, response=$response}" @@ -107,15 +105,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.responses == other.responses && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && responses == other.responses && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ override fun toString() = - "HrisPayStatementRetrieveManyPage.Response{responses=$responses, additionalProperties=$additionalProperties}" + "Response{responses=$responses, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt index 8a0b1a43..720003e1 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisPayStatementRetrieveManyPageAsync && this.payStatementsService == other.payStatementsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisPayStatementRetrieveManyPageAsync && payStatementsService == other.payStatementsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(payStatementsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(payStatementsService, params, response) /* spotless:on */ override fun toString() = "HrisPayStatementRetrieveManyPageAsync{payStatementsService=$payStatementsService, params=$params, response=$response}" @@ -110,15 +108,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.responses == other.responses && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && responses == other.responses && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(responses, additionalProperties) /* spotless:on */ override fun toString() = - "HrisPayStatementRetrieveManyPageAsync.Response{responses=$responses, additionalProperties=$additionalProperties}" + "Response{responses=$responses, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt index 12cda1b0..f8512da0 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParams.kt @@ -25,6 +25,12 @@ constructor( fun requests(): List = requests + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): HrisPayStatementRetrieveManyBody { return HrisPayStatementRetrieveManyBody(requests, additionalBodyProperties) @@ -99,43 +105,19 @@ constructor( return true } - return /* spotless:off */ other is HrisPayStatementRetrieveManyBody && this.requests == other.requests && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is HrisPayStatementRetrieveManyBody && requests == other.requests && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(requests, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(requests, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "HrisPayStatementRetrieveManyBody{requests=$requests, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisPayStatementRetrieveManyParams && this.requests == other.requests && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(requests, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "HrisPayStatementRetrieveManyParams{requests=$requests, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -154,12 +136,12 @@ constructor( @JvmSynthetic internal fun from(hrisPayStatementRetrieveManyParams: HrisPayStatementRetrieveManyParams) = apply { - this.requests(hrisPayStatementRetrieveManyParams.requests) - additionalHeaders(hrisPayStatementRetrieveManyParams.additionalHeaders) - additionalQueryParams(hrisPayStatementRetrieveManyParams.additionalQueryParams) - additionalBodyProperties( - hrisPayStatementRetrieveManyParams.additionalBodyProperties - ) + requests = hrisPayStatementRetrieveManyParams.requests.toMutableList() + additionalHeaders = hrisPayStatementRetrieveManyParams.additionalHeaders.toBuilder() + additionalQueryParams = + hrisPayStatementRetrieveManyParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + hrisPayStatementRetrieveManyParams.additionalBodyProperties.toMutableMap() } /** The array of batch requests. */ @@ -293,7 +275,7 @@ constructor( fun build(): HrisPayStatementRetrieveManyParams = HrisPayStatementRetrieveManyParams( - checkNotNull(requests) { "`requests` is required but was not set" }.toImmutable(), + requests.toImmutable(), additionalHeaders.build(), additionalQueryParams.build(), additionalBodyProperties.toImmutable(), @@ -383,19 +365,29 @@ constructor( return true } - return /* spotless:off */ other is Request && this.paymentId == other.paymentId && this.limit == other.limit && this.offset == other.offset && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Request && paymentId == other.paymentId && limit == other.limit && offset == other.offset && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paymentId, limit, offset, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paymentId, limit, offset, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Request{paymentId=$paymentId, limit=$limit, offset=$offset, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisPayStatementRetrieveManyParams && requests == other.requests && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(requests, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "HrisPayStatementRetrieveManyParams{requests=$requests, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt index a6e6ba92..94842363 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisPaymentListPage && this.paymentsService == other.paymentsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisPaymentListPage && paymentsService == other.paymentsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(paymentsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(paymentsService, params, response) /* spotless:on */ override fun toString() = "HrisPaymentListPage{paymentsService=$paymentsService, params=$params, response=$response}" @@ -102,15 +100,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisPaymentListPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt index b5438ef2..13f61b41 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is HrisPaymentListPageAsync && this.paymentsService == other.paymentsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is HrisPaymentListPageAsync && paymentsService == other.paymentsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(paymentsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(paymentsService, params, response) /* spotless:on */ override fun toString() = "HrisPaymentListPageAsync{paymentsService=$paymentsService, params=$params, response=$response}" @@ -109,15 +107,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "HrisPaymentListPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt index bc678231..df559364 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisPaymentListParams.kt @@ -21,6 +21,10 @@ constructor( fun startDate(): LocalDate = startDate + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic @@ -32,25 +36,6 @@ constructor( return queryParams.build() } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is HrisPaymentListParams && this.endDate == other.endDate && this.startDate == other.startDate && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(endDate, startDate, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "HrisPaymentListParams{endDate=$endDate, startDate=$startDate, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -68,10 +53,10 @@ constructor( @JvmSynthetic internal fun from(hrisPaymentListParams: HrisPaymentListParams) = apply { - this.endDate = hrisPaymentListParams.endDate - this.startDate = hrisPaymentListParams.startDate - additionalHeaders(hrisPaymentListParams.additionalHeaders) - additionalQueryParams(hrisPaymentListParams.additionalQueryParams) + endDate = hrisPaymentListParams.endDate + startDate = hrisPaymentListParams.startDate + additionalHeaders = hrisPaymentListParams.additionalHeaders.toBuilder() + additionalQueryParams = hrisPaymentListParams.additionalQueryParams.toBuilder() } /** The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` format. */ @@ -186,4 +171,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is HrisPaymentListParams && endDate == other.endDate && startDate == other.startDate && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(endDate, startDate, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "HrisPaymentListParams{endDate=$endDate, startDate=$startDate, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Income.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Income.kt index 743971be..46d55876 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Income.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Income.kt @@ -182,7 +182,7 @@ private constructor( return true } - return /* spotless:off */ other is Unit && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Unit && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -273,17 +273,14 @@ private constructor( return true } - return /* spotless:off */ other is Income && this.unit == other.unit && this.amount == other.amount && this.currency == other.currency && this.effectiveDate == other.effectiveDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Income && unit == other.unit && amount == other.amount && currency == other.currency && effectiveDate == other.effectiveDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(unit, amount, currency, effectiveDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(unit, amount, currency, effectiveDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Income{unit=$unit, amount=$amount, currency=$currency, effectiveDate=$effectiveDate, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Individual.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Individual.kt index 9693a8e9..07f9fa9c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Individual.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Individual.kt @@ -442,7 +442,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -491,17 +491,14 @@ private constructor( return true } - return /* spotless:off */ other is Email && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Email && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Email{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -520,7 +517,7 @@ private constructor( return true } - return /* spotless:off */ other is Ethnicity && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Ethnicity && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -618,7 +615,7 @@ private constructor( return true } - return /* spotless:off */ other is Gender && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Gender && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -772,7 +769,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -821,17 +818,14 @@ private constructor( return true } - return /* spotless:off */ other is PhoneNumber && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PhoneNumber && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PhoneNumber{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -842,17 +836,14 @@ private constructor( return true } - return /* spotless:off */ other is Individual && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.preferredName == other.preferredName && this.emails == other.emails && this.phoneNumbers == other.phoneNumbers && this.gender == other.gender && this.ethnicity == other.ethnicity && this.dob == other.dob && this.residence == other.residence && this.ssn == other.ssn && this.encryptedSsn == other.encryptedSsn && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Individual && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && preferredName == other.preferredName && emails == other.emails && phoneNumbers == other.phoneNumbers && gender == other.gender && ethnicity == other.ethnicity && dob == other.dob && residence == other.residence && ssn == other.ssn && encryptedSsn == other.encryptedSsn && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, preferredName, emails, phoneNumbers, gender, ethnicity, dob, residence, ssn, encryptedSsn, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, preferredName, emails, phoneNumbers, gender, ethnicity, dob, residence, ssn, encryptedSsn, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Individual{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, preferredName=$preferredName, emails=$emails, phoneNumbers=$phoneNumbers, gender=$gender, ethnicity=$ethnicity, dob=$dob, residence=$residence, ssn=$ssn, encryptedSsn=$encryptedSsn, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt index 179fea18..31baddd4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualBenefit.kt @@ -310,7 +310,7 @@ private constructor( return true } - return /* spotless:off */ other is HsaContributionLimit && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is HsaContributionLimit && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -359,17 +359,14 @@ private constructor( return true } - return /* spotless:off */ other is Body && this.employeeDeduction == other.employeeDeduction && this.companyContribution == other.companyContribution && this.annualMaximum == other.annualMaximum && this.catchUp == other.catchUp && this.hsaContributionLimit == other.hsaContributionLimit && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Body && employeeDeduction == other.employeeDeduction && companyContribution == other.companyContribution && annualMaximum == other.annualMaximum && catchUp == other.catchUp && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(employeeDeduction, companyContribution, annualMaximum, catchUp, hsaContributionLimit, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(employeeDeduction, companyContribution, annualMaximum, catchUp, hsaContributionLimit, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Body{employeeDeduction=$employeeDeduction, companyContribution=$companyContribution, annualMaximum=$annualMaximum, catchUp=$catchUp, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" @@ -380,17 +377,14 @@ private constructor( return true } - return /* spotless:off */ other is IndividualBenefit && this.individualId == other.individualId && this.code == other.code && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualBenefit && individualId == other.individualId && code == other.code && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, code, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, code, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualBenefit{individualId=$individualId, code=$code, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEnrolledIdsResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEnrolledIdsResponse.kt index 81b90c37..15f09839 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEnrolledIdsResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEnrolledIdsResponse.kt @@ -106,17 +106,14 @@ private constructor( return true } - return /* spotless:off */ other is IndividualEnrolledIdsResponse && this.benefitId == other.benefitId && this.individualIds == other.individualIds && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualEnrolledIdsResponse && benefitId == other.benefitId && individualIds == other.individualIds && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(benefitId, individualIds, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(benefitId, individualIds, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualEnrolledIdsResponse{benefitId=$benefitId, individualIds=$individualIds, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEvent.kt index 8c71751c..c4015f99 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualEvent.kt @@ -272,17 +272,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{individualId=$individualId, additionalProperties=$additionalProperties}" @@ -301,7 +298,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -356,17 +353,14 @@ private constructor( return true } - return /* spotless:off */ other is IndividualEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualInDirectory.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualInDirectory.kt index 403734c6..ab6cf71f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualInDirectory.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualInDirectory.kt @@ -278,17 +278,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -370,17 +367,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" } @@ -390,17 +384,14 @@ private constructor( return true } - return /* spotless:off */ other is IndividualInDirectory && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.manager == other.manager && this.department == other.department && this.isActive == other.isActive && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualInDirectory && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && manager == other.manager && department == other.department && isActive == other.isActive && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, manager, department, isActive, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, manager, department, isActive, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualInDirectory{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, manager=$manager, department=$department, isActive=$isActive, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualResponse.kt index 84f45cef..6c842ba5 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualResponse.kt @@ -123,17 +123,14 @@ private constructor( return true } - return /* spotless:off */ other is IndividualResponse && this.individualId == other.individualId && this.code == other.code && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualResponse && individualId == other.individualId && code == other.code && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, code, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, code, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualResponse{individualId=$individualId, code=$code, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualUpdateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualUpdateResponse.kt index 2ba8aa22..cbcea3dc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualUpdateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualUpdateResponse.kt @@ -442,7 +442,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -491,17 +491,14 @@ private constructor( return true } - return /* spotless:off */ other is Email && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Email && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Email{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -520,7 +517,7 @@ private constructor( return true } - return /* spotless:off */ other is Ethnicity && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Ethnicity && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -618,7 +615,7 @@ private constructor( return true } - return /* spotless:off */ other is Gender && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Gender && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -772,7 +769,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -821,17 +818,14 @@ private constructor( return true } - return /* spotless:off */ other is PhoneNumber && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PhoneNumber && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PhoneNumber{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -842,17 +836,14 @@ private constructor( return true } - return /* spotless:off */ other is IndividualUpdateResponse && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.preferredName == other.preferredName && this.emails == other.emails && this.phoneNumbers == other.phoneNumbers && this.gender == other.gender && this.ethnicity == other.ethnicity && this.dob == other.dob && this.ssn == other.ssn && this.encryptedSsn == other.encryptedSsn && this.residence == other.residence && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualUpdateResponse && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && preferredName == other.preferredName && emails == other.emails && phoneNumbers == other.phoneNumbers && gender == other.gender && ethnicity == other.ethnicity && dob == other.dob && ssn == other.ssn && encryptedSsn == other.encryptedSsn && residence == other.residence && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(firstName, middleName, lastName, preferredName, emails, phoneNumbers, gender, ethnicity, dob, ssn, encryptedSsn, residence, id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(firstName, middleName, lastName, preferredName, emails, phoneNumbers, gender, ethnicity, dob, ssn, encryptedSsn, residence, id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualUpdateResponse{firstName=$firstName, middleName=$middleName, lastName=$lastName, preferredName=$preferredName, emails=$emails, phoneNumbers=$phoneNumbers, gender=$gender, ethnicity=$ethnicity, dob=$dob, ssn=$ssn, encryptedSsn=$encryptedSsn, residence=$residence, id=$id, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt index 4a4bb33f..6f9167b7 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Introspection.kt @@ -700,17 +700,14 @@ private constructor( return true } - return /* spotless:off */ other is ConnectionStatus && this.status == other.status && this.message == other.message && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ConnectionStatus && status == other.status && message == other.message && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(status, message, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(status, message, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "ConnectionStatus{status=$status, message=$message, additionalProperties=$additionalProperties}" @@ -729,7 +726,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -796,17 +793,14 @@ private constructor( return true } - return /* spotless:off */ other is AuthenticationMethod && this.type == other.type && this.connectionStatus == other.connectionStatus && this.products == other.products && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AuthenticationMethod && type == other.type && connectionStatus == other.connectionStatus && products == other.products && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, connectionStatus, products, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, connectionStatus, products, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AuthenticationMethod{type=$type, connectionStatus=$connectionStatus, products=$products, additionalProperties=$additionalProperties}" @@ -825,7 +819,7 @@ private constructor( return true } - return /* spotless:off */ other is ClientType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ClientType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -966,17 +960,14 @@ private constructor( return true } - return /* spotless:off */ other is ConnectionStatus && this.status == other.status && this.message == other.message && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ConnectionStatus && status == other.status && message == other.message && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(status, message, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(status, message, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "ConnectionStatus{status=$status, message=$message, additionalProperties=$additionalProperties}" @@ -995,7 +986,7 @@ private constructor( return true } - return /* spotless:off */ other is ConnectionType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is ConnectionType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1044,17 +1035,14 @@ private constructor( return true } - return /* spotless:off */ other is Introspection && this.connectionId == other.connectionId && this.connectionStatus == other.connectionStatus && this.clientId == other.clientId && this.clientType == other.clientType && this.connectionType == other.connectionType && this.companyId == other.companyId && this.accountId == other.accountId && this.customerId == other.customerId && this.customerName == other.customerName && this.customerEmail == other.customerEmail && this.authenticationMethods == other.authenticationMethods && this.products == other.products && this.username == other.username && this.providerId == other.providerId && this.payrollProviderId == other.payrollProviderId && this.manual == other.manual && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Introspection && connectionId == other.connectionId && connectionStatus == other.connectionStatus && clientId == other.clientId && clientType == other.clientType && connectionType == other.connectionType && companyId == other.companyId && accountId == other.accountId && customerId == other.customerId && customerName == other.customerName && customerEmail == other.customerEmail && authenticationMethods == other.authenticationMethods && products == other.products && username == other.username && providerId == other.providerId && payrollProviderId == other.payrollProviderId && manual == other.manual && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, connectionStatus, clientId, clientType, connectionType, companyId, accountId, customerId, customerName, customerEmail, authenticationMethods, products, username, providerId, payrollProviderId, manual, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, connectionStatus, clientId, clientType, connectionType, companyId, accountId, customerId, customerName, customerEmail, authenticationMethods, products, username, providerId, payrollProviderId, manual, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Introspection{connectionId=$connectionId, connectionStatus=$connectionStatus, clientId=$clientId, clientType=$clientType, connectionType=$connectionType, companyId=$companyId, accountId=$accountId, customerId=$customerId, customerName=$customerName, customerEmail=$customerEmail, authenticationMethods=$authenticationMethods, products=$products, username=$username, providerId=$providerId, payrollProviderId=$payrollProviderId, manual=$manual, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt index 9055145e..fb33c269 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedCreateParams.kt @@ -33,18 +33,22 @@ import kotlin.jvm.optionals.getOrNull class JobAutomatedCreateParams constructor( private val dataSyncAll: DataSyncAll?, - private val w4DataSync: W4DataSync?, + private val w4FormEmployeeSync: W4FormEmployeeSync?, private val additionalHeaders: Headers, private val additionalQueryParams: QueryParams, ) { fun dataSyncAll(): Optional = Optional.ofNullable(dataSyncAll) - fun w4DataSync(): Optional = Optional.ofNullable(w4DataSync) + fun w4FormEmployeeSync(): Optional = Optional.ofNullable(w4FormEmployeeSync) + + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams @JvmSynthetic internal fun getBody(): JobAutomatedCreateBody { - return JobAutomatedCreateBody(dataSyncAll, w4DataSync) + return JobAutomatedCreateBody(dataSyncAll, w4FormEmployeeSync) } @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @@ -56,28 +60,30 @@ constructor( class JobAutomatedCreateBody internal constructor( private val dataSyncAll: DataSyncAll? = null, - private val w4DataSync: W4DataSync? = null, + private val w4FormEmployeeSync: W4FormEmployeeSync? = null, private val _json: JsonValue? = null, ) { fun dataSyncAll(): Optional = Optional.ofNullable(dataSyncAll) - fun w4DataSync(): Optional = Optional.ofNullable(w4DataSync) + fun w4FormEmployeeSync(): Optional = + Optional.ofNullable(w4FormEmployeeSync) fun isDataSyncAll(): Boolean = dataSyncAll != null - fun isW4DataSync(): Boolean = w4DataSync != null + fun isW4FormEmployeeSync(): Boolean = w4FormEmployeeSync != null fun asDataSyncAll(): DataSyncAll = dataSyncAll.getOrThrow("dataSyncAll") - fun asW4DataSync(): W4DataSync = w4DataSync.getOrThrow("w4DataSync") + fun asW4FormEmployeeSync(): W4FormEmployeeSync = + w4FormEmployeeSync.getOrThrow("w4FormEmployeeSync") fun _json(): Optional = Optional.ofNullable(_json) fun accept(visitor: Visitor): T { return when { dataSyncAll != null -> visitor.visitDataSyncAll(dataSyncAll) - w4DataSync != null -> visitor.visitW4DataSync(w4DataSync) + w4FormEmployeeSync != null -> visitor.visitW4FormEmployeeSync(w4FormEmployeeSync) else -> visitor.unknown(_json) } } @@ -87,21 +93,19 @@ constructor( return true } - return /* spotless:off */ other is JobAutomatedCreateBody && this.dataSyncAll == other.dataSyncAll && this.w4DataSync == other.w4DataSync /* spotless:on */ + return /* spotless:off */ other is JobAutomatedCreateBody && dataSyncAll == other.dataSyncAll && w4FormEmployeeSync == other.w4FormEmployeeSync /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(dataSyncAll, w4DataSync) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dataSyncAll, w4FormEmployeeSync) /* spotless:on */ - override fun toString(): String { - return when { + override fun toString(): String = + when { dataSyncAll != null -> "JobAutomatedCreateBody{dataSyncAll=$dataSyncAll}" - w4DataSync != null -> "JobAutomatedCreateBody{w4DataSync=$w4DataSync}" + w4FormEmployeeSync != null -> + "JobAutomatedCreateBody{w4FormEmployeeSync=$w4FormEmployeeSync}" _json != null -> "JobAutomatedCreateBody{_unknown=$_json}" else -> throw IllegalStateException("Invalid JobAutomatedCreateBody") } - } companion object { @@ -110,15 +114,15 @@ constructor( JobAutomatedCreateBody(dataSyncAll = dataSyncAll) @JvmStatic - fun ofW4DataSync(w4DataSync: W4DataSync) = - JobAutomatedCreateBody(w4DataSync = w4DataSync) + fun ofW4FormEmployeeSync(w4FormEmployeeSync: W4FormEmployeeSync) = + JobAutomatedCreateBody(w4FormEmployeeSync = w4FormEmployeeSync) } interface Visitor { fun visitDataSyncAll(dataSyncAll: DataSyncAll): T - fun visitW4DataSync(w4DataSync: W4DataSync): T + fun visitW4FormEmployeeSync(w4FormEmployeeSync: W4FormEmployeeSync): T fun unknown(json: JsonValue?): T { throw FinchInvalidDataException("Unknown JobAutomatedCreateBody: $json") @@ -138,9 +142,9 @@ constructor( return JobAutomatedCreateBody(dataSyncAll = it, _json = json) } } - "w4_data_sync" -> { - tryDeserialize(node, jacksonTypeRef())?.let { - return JobAutomatedCreateBody(w4DataSync = it, _json = json) + "w4_form_employee_sync" -> { + tryDeserialize(node, jacksonTypeRef())?.let { + return JobAutomatedCreateBody(w4FormEmployeeSync = it, _json = json) } } } @@ -158,7 +162,8 @@ constructor( ) { when { value.dataSyncAll != null -> generator.writeObject(value.dataSyncAll) - value.w4DataSync != null -> generator.writeObject(value.w4DataSync) + value.w4FormEmployeeSync != null -> + generator.writeObject(value.w4FormEmployeeSync) value._json != null -> generator.writeObject(value._json) else -> throw IllegalStateException("Invalid JobAutomatedCreateBody") } @@ -166,25 +171,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is JobAutomatedCreateParams && this.dataSyncAll == other.dataSyncAll && this.w4DataSync == other.w4DataSync && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(dataSyncAll, w4DataSync, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "JobAutomatedCreateParams{dataSyncAll=$dataSyncAll, w4DataSync=$w4DataSync, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -196,26 +182,26 @@ constructor( class Builder { private var dataSyncAll: DataSyncAll? = null - private var w4DataSync: W4DataSync? = null + private var w4FormEmployeeSync: W4FormEmployeeSync? = null private var additionalHeaders: Headers.Builder = Headers.builder() private var additionalQueryParams: QueryParams.Builder = QueryParams.builder() @JvmSynthetic internal fun from(jobAutomatedCreateParams: JobAutomatedCreateParams) = apply { - this.dataSyncAll = jobAutomatedCreateParams.dataSyncAll - this.w4DataSync = jobAutomatedCreateParams.w4DataSync - additionalHeaders(jobAutomatedCreateParams.additionalHeaders) - additionalQueryParams(jobAutomatedCreateParams.additionalQueryParams) + dataSyncAll = jobAutomatedCreateParams.dataSyncAll + w4FormEmployeeSync = jobAutomatedCreateParams.w4FormEmployeeSync + additionalHeaders = jobAutomatedCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = jobAutomatedCreateParams.additionalQueryParams.toBuilder() } fun forDataSyncAll(dataSyncAll: DataSyncAll) = apply { this.dataSyncAll = dataSyncAll - this.w4DataSync = null + this.w4FormEmployeeSync = null } - fun forW4DataSync(w4DataSync: W4DataSync) = apply { + fun forW4FormEmployeeSync(w4FormEmployeeSync: W4FormEmployeeSync) = apply { this.dataSyncAll = null - this.w4DataSync = w4DataSync + this.w4FormEmployeeSync = w4FormEmployeeSync } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -319,7 +305,7 @@ constructor( fun build(): JobAutomatedCreateParams = JobAutomatedCreateParams( dataSyncAll, - w4DataSync, + w4FormEmployeeSync, additionalHeaders.build(), additionalQueryParams.build(), ) @@ -395,7 +381,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -438,25 +424,22 @@ constructor( return true } - return /* spotless:off */ other is DataSyncAll && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is DataSyncAll && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "DataSyncAll{type=$type, additionalProperties=$additionalProperties}" } - @JsonDeserialize(builder = W4DataSync.Builder::class) + @JsonDeserialize(builder = W4FormEmployeeSync.Builder::class) @NoAutoDetect - class W4DataSync + class W4FormEmployeeSync private constructor( private val type: Type?, private val individualId: String?, @@ -487,10 +470,10 @@ constructor( private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic - internal fun from(w4DataSync: W4DataSync) = apply { - this.type = w4DataSync.type - this.individualId = w4DataSync.individualId - additionalProperties(w4DataSync.additionalProperties) + internal fun from(w4FormEmployeeSync: W4FormEmployeeSync) = apply { + this.type = w4FormEmployeeSync.type + this.individualId = w4FormEmployeeSync.individualId + additionalProperties(w4FormEmployeeSync.additionalProperties) } /** The type of job to start. */ @@ -514,8 +497,8 @@ constructor( this.additionalProperties.putAll(additionalProperties) } - fun build(): W4DataSync = - W4DataSync( + fun build(): W4FormEmployeeSync = + W4FormEmployeeSync( checkNotNull(type) { "`type` is required but was not set" }, checkNotNull(individualId) { "`individualId` is required but was not set" }, additionalProperties.toImmutable(), @@ -535,7 +518,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -544,29 +527,29 @@ constructor( companion object { - @JvmField val W4_DATA_SYNC = Type(JsonField.of("w4_data_sync")) + @JvmField val W4_FORM_EMPLOYEE_SYNC = Type(JsonField.of("w4_form_employee_sync")) @JvmStatic fun of(value: String) = Type(JsonField.of(value)) } enum class Known { - W4_DATA_SYNC, + W4_FORM_EMPLOYEE_SYNC, } enum class Value { - W4_DATA_SYNC, + W4_FORM_EMPLOYEE_SYNC, _UNKNOWN, } fun value(): Value = when (this) { - W4_DATA_SYNC -> Value.W4_DATA_SYNC + W4_FORM_EMPLOYEE_SYNC -> Value.W4_FORM_EMPLOYEE_SYNC else -> Value._UNKNOWN } fun known(): Known = when (this) { - W4_DATA_SYNC -> Known.W4_DATA_SYNC + W4_FORM_EMPLOYEE_SYNC -> Known.W4_FORM_EMPLOYEE_SYNC else -> throw FinchInvalidDataException("Unknown Type: $value") } @@ -578,19 +561,29 @@ constructor( return true } - return /* spotless:off */ other is W4DataSync && this.type == other.type && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is W4FormEmployeeSync && type == other.type && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = - "W4DataSync{type=$type, individualId=$individualId, additionalProperties=$additionalProperties}" + "W4FormEmployeeSync{type=$type, individualId=$individualId, additionalProperties=$additionalProperties}" + } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is JobAutomatedCreateParams && dataSyncAll == other.dataSyncAll && w4FormEmployeeSync == other.w4FormEmployeeSync && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(dataSyncAll, w4FormEmployeeSync, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "JobAutomatedCreateParams{dataSyncAll=$dataSyncAll, w4FormEmployeeSync=$w4FormEmployeeSync, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPage.kt index 72fe5f98..ccc8bf1c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPage.kt @@ -36,12 +36,10 @@ private constructor( return true } - return /* spotless:off */ other is JobAutomatedListPage && this.automatedService == other.automatedService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is JobAutomatedListPage && automatedService == other.automatedService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(automatedService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(automatedService, params, response) /* spotless:on */ override fun toString() = "JobAutomatedListPage{automatedService=$automatedService, params=$params, response=$response}" @@ -129,15 +127,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.data == other.data && this.paging == other.paging && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && data == other.data && paging == other.paging && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(data, paging, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(data, paging, additionalProperties) /* spotless:on */ override fun toString() = - "JobAutomatedListPage.Response{data=$data, paging=$paging, additionalProperties=$additionalProperties}" + "Response{data=$data, paging=$paging, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPageAsync.kt index 9b723412..f7e942bb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListPageAsync.kt @@ -37,12 +37,10 @@ private constructor( return true } - return /* spotless:off */ other is JobAutomatedListPageAsync && this.automatedService == other.automatedService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is JobAutomatedListPageAsync && automatedService == other.automatedService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(automatedService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(automatedService, params, response) /* spotless:on */ override fun toString() = "JobAutomatedListPageAsync{automatedService=$automatedService, params=$params, response=$response}" @@ -132,15 +130,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.data == other.data && this.paging == other.paging && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && data == other.data && paging == other.paging && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(data, paging, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(data, paging, additionalProperties) /* spotless:on */ override fun toString() = - "JobAutomatedListPageAsync.Response{data=$data, paging=$paging, additionalProperties=$additionalProperties}" + "Response{data=$data, paging=$paging, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt index 6f4fe9fc..87f58414 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedListParams.kt @@ -21,6 +21,10 @@ constructor( fun offset(): Optional = Optional.ofNullable(offset) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic @@ -32,25 +36,6 @@ constructor( return queryParams.build() } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is JobAutomatedListParams && this.limit == other.limit && this.offset == other.offset && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(limit, offset, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "JobAutomatedListParams{limit=$limit, offset=$offset, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -68,10 +53,10 @@ constructor( @JvmSynthetic internal fun from(jobAutomatedListParams: JobAutomatedListParams) = apply { - this.limit = jobAutomatedListParams.limit - this.offset = jobAutomatedListParams.offset - additionalHeaders(jobAutomatedListParams.additionalHeaders) - additionalQueryParams(jobAutomatedListParams.additionalQueryParams) + limit = jobAutomatedListParams.limit + offset = jobAutomatedListParams.offset + additionalHeaders = jobAutomatedListParams.additionalHeaders.toBuilder() + additionalQueryParams = jobAutomatedListParams.additionalQueryParams.toBuilder() } /** Number of items to return */ @@ -186,4 +171,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is JobAutomatedListParams && limit == other.limit && offset == other.offset && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(limit, offset, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "JobAutomatedListParams{limit=$limit, offset=$offset, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt index 7a2f981c..6b746f4d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobAutomatedRetrieveParams.kt @@ -17,6 +17,10 @@ constructor( fun jobId(): String = jobId + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams @@ -28,25 +32,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is JobAutomatedRetrieveParams && this.jobId == other.jobId && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(jobId, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "JobAutomatedRetrieveParams{jobId=$jobId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -63,9 +48,9 @@ constructor( @JvmSynthetic internal fun from(jobAutomatedRetrieveParams: JobAutomatedRetrieveParams) = apply { - this.jobId = jobAutomatedRetrieveParams.jobId - additionalHeaders(jobAutomatedRetrieveParams.additionalHeaders) - additionalQueryParams(jobAutomatedRetrieveParams.additionalQueryParams) + jobId = jobAutomatedRetrieveParams.jobId + additionalHeaders = jobAutomatedRetrieveParams.additionalHeaders.toBuilder() + additionalQueryParams = jobAutomatedRetrieveParams.additionalQueryParams.toBuilder() } fun jobId(jobId: String) = apply { this.jobId = jobId } @@ -175,4 +160,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is JobAutomatedRetrieveParams && jobId == other.jobId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(jobId, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "JobAutomatedRetrieveParams{jobId=$jobId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCompletionEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCompletionEvent.kt index 105dc920..1bc6c5df 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCompletionEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCompletionEvent.kt @@ -292,17 +292,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.jobId == other.jobId && this.jobUrl == other.jobUrl && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && jobId == other.jobId && jobUrl == other.jobUrl && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(jobId, jobUrl, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(jobId, jobUrl, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{jobId=$jobId, jobUrl=$jobUrl, additionalProperties=$additionalProperties}" @@ -321,7 +318,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -405,17 +402,14 @@ private constructor( return true } - return /* spotless:off */ other is JobCompletionEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is JobCompletionEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "JobCompletionEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCreateResponse.kt index 826f7c66..6376d9e4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCreateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobCreateResponse.kt @@ -158,17 +158,14 @@ private constructor( return true } - return /* spotless:off */ other is JobCreateResponse && this.jobId == other.jobId && this.jobUrl == other.jobUrl && this.allowedRefreshes == other.allowedRefreshes && this.remainingRefreshes == other.remainingRefreshes && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is JobCreateResponse && jobId == other.jobId && jobUrl == other.jobUrl && allowedRefreshes == other.allowedRefreshes && remainingRefreshes == other.remainingRefreshes && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(jobId, jobUrl, allowedRefreshes, remainingRefreshes, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(jobId, jobUrl, allowedRefreshes, remainingRefreshes, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "JobCreateResponse{jobId=$jobId, jobUrl=$jobUrl, allowedRefreshes=$allowedRefreshes, remainingRefreshes=$remainingRefreshes, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt index d8d37abf..0dc90dbb 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/JobManualRetrieveParams.kt @@ -17,6 +17,10 @@ constructor( fun jobId(): String = jobId + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams @@ -28,25 +32,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is JobManualRetrieveParams && this.jobId == other.jobId && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(jobId, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "JobManualRetrieveParams{jobId=$jobId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -63,9 +48,9 @@ constructor( @JvmSynthetic internal fun from(jobManualRetrieveParams: JobManualRetrieveParams) = apply { - this.jobId = jobManualRetrieveParams.jobId - additionalHeaders(jobManualRetrieveParams.additionalHeaders) - additionalQueryParams(jobManualRetrieveParams.additionalQueryParams) + jobId = jobManualRetrieveParams.jobId + additionalHeaders = jobManualRetrieveParams.additionalHeaders.toBuilder() + additionalQueryParams = jobManualRetrieveParams.additionalQueryParams.toBuilder() } fun jobId(jobId: String) = apply { this.jobId = jobId } @@ -175,4 +160,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is JobManualRetrieveParams && jobId == other.jobId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(jobId, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "JobManualRetrieveParams{jobId=$jobId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Location.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Location.kt index ede20034..893f1856 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Location.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Location.kt @@ -219,17 +219,14 @@ private constructor( return true } - return /* spotless:off */ other is Location && this.line1 == other.line1 && this.line2 == other.line2 && this.city == other.city && this.state == other.state && this.postalCode == other.postalCode && this.country == other.country && this.name == other.name && this.sourceId == other.sourceId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Location && line1 == other.line1 && line2 == other.line2 && city == other.city && state == other.state && postalCode == other.postalCode && country == other.country && name == other.name && sourceId == other.sourceId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(line1, line2, city, state, postalCode, country, name, sourceId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(line1, line2, city, state, postalCode, country, name, sourceId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Location{line1=$line1, line2=$line2, city=$city, state=$state, postalCode=$postalCode, country=$country, name=$name, sourceId=$sourceId, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ManualAsyncJob.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ManualAsyncJob.kt index cff503fe..0798bd9a 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ManualAsyncJob.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ManualAsyncJob.kt @@ -135,7 +135,7 @@ private constructor( return true } - return /* spotless:off */ other is Status && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Status && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -196,17 +196,14 @@ private constructor( return true } - return /* spotless:off */ other is ManualAsyncJob && this.jobId == other.jobId && this.status == other.status && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is ManualAsyncJob && jobId == other.jobId && status == other.status && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(jobId, status, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(jobId, status, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "ManualAsyncJob{jobId=$jobId, status=$status, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Money.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Money.kt index 878a8d63..056c6aa6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Money.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Money.kt @@ -109,17 +109,14 @@ private constructor( return true } - return /* spotless:off */ other is Money && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Money && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Money{amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupport.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupport.kt index 8e7910e7..cd3bf015 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupport.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupport.kt @@ -21,7 +21,7 @@ private constructor( return true } - return /* spotless:off */ other is OperationSupport && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is OperationSupport && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupportMatrix.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupportMatrix.kt index 90561b30..38670699 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupportMatrix.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/OperationSupportMatrix.kt @@ -279,17 +279,14 @@ private constructor( return true } - return /* spotless:off */ other is OperationSupportMatrix && this.create == other.create && this.update == other.update && this.delete == other.delete && this.read == other.read && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is OperationSupportMatrix && create == other.create && update == other.update && delete == other.delete && read == other.read && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(create, update, delete, read, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(create, update, delete, read, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "OperationSupportMatrix{create=$create, update=$update, delete=$delete, read=$read, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Paging.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Paging.kt index 11dc9391..37449a7b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Paging.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Paging.kt @@ -113,17 +113,14 @@ private constructor( return true } - return /* spotless:off */ other is Paging && this.count == other.count && this.offset == other.offset && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Paging && count == other.count && offset == other.offset && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(count, offset, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(count, offset, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Paging{count=$count, offset=$offset, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupListResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupListResponse.kt index fc3beb6b..72227b93 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupListResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupListResponse.kt @@ -145,7 +145,7 @@ private constructor( return true } - return /* spotless:off */ other is PayFrequency && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is PayFrequency && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -236,17 +236,14 @@ private constructor( return true } - return /* spotless:off */ other is PayGroupListResponse && this.id == other.id && this.name == other.name && this.payFrequencies == other.payFrequencies && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayGroupListResponse && id == other.id && name == other.name && payFrequencies == other.payFrequencies && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, name, payFrequencies, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, name, payFrequencies, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayGroupListResponse{id=$id, name=$name, payFrequencies=$payFrequencies, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupRetrieveResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupRetrieveResponse.kt index a8ccd9e4..e119b5be 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupRetrieveResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayGroupRetrieveResponse.kt @@ -160,7 +160,7 @@ private constructor( return true } - return /* spotless:off */ other is PayFrequency && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is PayFrequency && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -251,17 +251,14 @@ private constructor( return true } - return /* spotless:off */ other is PayGroupRetrieveResponse && this.id == other.id && this.name == other.name && this.payFrequencies == other.payFrequencies && this.individualIds == other.individualIds && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayGroupRetrieveResponse && id == other.id && name == other.name && payFrequencies == other.payFrequencies && individualIds == other.individualIds && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, name, payFrequencies, individualIds, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, name, payFrequencies, individualIds, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayGroupRetrieveResponse{id=$id, name=$name, payFrequencies=$payFrequencies, individualIds=$individualIds, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatement.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatement.kt index 8f3fb001..ecd56450 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatement.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatement.kt @@ -445,7 +445,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -560,17 +560,14 @@ private constructor( return true } - return /* spotless:off */ other is Earning && this.type == other.type && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.hours == other.hours && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Earning && type == other.type && name == other.name && amount == other.amount && currency == other.currency && hours == other.hours && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, amount, currency, hours, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, amount, currency, hours, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Earning{type=$type, name=$name, amount=$amount, currency=$currency, hours=$hours, additionalProperties=$additionalProperties}" @@ -731,17 +728,14 @@ private constructor( return true } - return /* spotless:off */ other is EmployeeDeduction && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.preTax == other.preTax && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployeeDeduction && name == other.name && amount == other.amount && currency == other.currency && preTax == other.preTax && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, currency, preTax, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, currency, preTax, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployeeDeduction{name=$name, amount=$amount, currency=$currency, preTax=$preTax, type=$type, additionalProperties=$additionalProperties}" @@ -883,17 +877,14 @@ private constructor( return true } - return /* spotless:off */ other is EmployerContribution && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployerContribution && name == other.name && amount == other.amount && currency == other.currency && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, currency, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, currency, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployerContribution{name=$name, amount=$amount, currency=$currency, type=$type, additionalProperties=$additionalProperties}" @@ -912,7 +903,7 @@ private constructor( return true } - return /* spotless:off */ other is PaymentMethod && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is PaymentMethod && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1119,7 +1110,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1180,17 +1171,14 @@ private constructor( return true } - return /* spotless:off */ other is Tax && this.type == other.type && this.name == other.name && this.employer == other.employer && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Tax && type == other.type && name == other.name && employer == other.employer && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, employer, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, employer, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Tax{type=$type, name=$name, employer=$employer, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -1209,7 +1197,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1264,17 +1252,14 @@ private constructor( return true } - return /* spotless:off */ other is PayStatement && this.individualId == other.individualId && this.type == other.type && this.paymentMethod == other.paymentMethod && this.totalHours == other.totalHours && this.grossPay == other.grossPay && this.netPay == other.netPay && this.earnings == other.earnings && this.taxes == other.taxes && this.employeeDeductions == other.employeeDeductions && this.employerContributions == other.employerContributions && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatement && individualId == other.individualId && type == other.type && paymentMethod == other.paymentMethod && totalHours == other.totalHours && grossPay == other.grossPay && netPay == other.netPay && earnings == other.earnings && taxes == other.taxes && employeeDeductions == other.employeeDeductions && employerContributions == other.employerContributions && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, taxes, employeeDeductions, employerContributions, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, taxes, employeeDeductions, employerContributions, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatement{individualId=$individualId, type=$type, paymentMethod=$paymentMethod, totalHours=$totalHours, grossPay=$grossPay, netPay=$netPay, earnings=$earnings, taxes=$taxes, employeeDeductions=$employeeDeductions, employerContributions=$employerContributions, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementEvent.kt index 24b516ac..b8ee9567 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementEvent.kt @@ -295,17 +295,14 @@ private constructor( return true } - return /* spotless:off */ other is Data && this.paymentId == other.paymentId && this.individualId == other.individualId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Data && paymentId == other.paymentId && individualId == other.individualId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paymentId, individualId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paymentId, individualId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Data{paymentId=$paymentId, individualId=$individualId, additionalProperties=$additionalProperties}" @@ -324,7 +321,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -379,17 +376,14 @@ private constructor( return true } - return /* spotless:off */ other is PayStatementEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatementEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatementEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponse.kt index a83a4407..c2f2b6fa 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponse.kt @@ -120,17 +120,14 @@ private constructor( return true } - return /* spotless:off */ other is PayStatementResponse && this.paymentId == other.paymentId && this.code == other.code && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatementResponse && paymentId == other.paymentId && code == other.code && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paymentId, code, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paymentId, code, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatementResponse{paymentId=$paymentId, code=$code, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponseBody.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponseBody.kt index 8d18f305..fb09f3f4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponseBody.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayStatementResponseBody.kt @@ -113,17 +113,14 @@ private constructor( return true } - return /* spotless:off */ other is PayStatementResponseBody && this.paging == other.paging && this.payStatements == other.payStatements && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatementResponseBody && paging == other.paging && payStatements == other.payStatements && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paging, payStatements, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paging, payStatements, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatementResponseBody{paging=$paging, payStatements=$payStatements, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Payment.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Payment.kt index 86ef9eaf..701bd06d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Payment.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Payment.kt @@ -303,7 +303,7 @@ private constructor( return true } - return /* spotless:off */ other is PayFrequency && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is PayFrequency && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -480,17 +480,14 @@ private constructor( return true } - return /* spotless:off */ other is PayPeriod && this.startDate == other.startDate && this.endDate == other.endDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayPeriod && startDate == other.startDate && endDate == other.endDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(startDate, endDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(startDate, endDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayPeriod{startDate=$startDate, endDate=$endDate, additionalProperties=$additionalProperties}" @@ -501,17 +498,14 @@ private constructor( return true } - return /* spotless:off */ other is Payment && this.id == other.id && this.payPeriod == other.payPeriod && this.payDate == other.payDate && this.debitDate == other.debitDate && this.companyDebit == other.companyDebit && this.grossPay == other.grossPay && this.netPay == other.netPay && this.employerTaxes == other.employerTaxes && this.employeeTaxes == other.employeeTaxes && this.individualIds == other.individualIds && this.payGroupIds == other.payGroupIds && this.payFrequencies == other.payFrequencies && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Payment && id == other.id && payPeriod == other.payPeriod && payDate == other.payDate && debitDate == other.debitDate && companyDebit == other.companyDebit && grossPay == other.grossPay && netPay == other.netPay && employerTaxes == other.employerTaxes && employeeTaxes == other.employeeTaxes && individualIds == other.individualIds && payGroupIds == other.payGroupIds && payFrequencies == other.payFrequencies && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, payPeriod, payDate, debitDate, companyDebit, grossPay, netPay, employerTaxes, employeeTaxes, individualIds, payGroupIds, payFrequencies, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, payPeriod, payDate, debitDate, companyDebit, grossPay, netPay, employerTaxes, employeeTaxes, individualIds, payGroupIds, payFrequencies, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Payment{id=$id, payPeriod=$payPeriod, payDate=$payDate, debitDate=$debitDate, companyDebit=$companyDebit, grossPay=$grossPay, netPay=$netPay, employerTaxes=$employerTaxes, employeeTaxes=$employeeTaxes, individualIds=$individualIds, payGroupIds=$payGroupIds, payFrequencies=$payFrequencies, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentCreateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentCreateResponse.kt index fadc759d..37c061f6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentCreateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentCreateResponse.kt @@ -112,17 +112,14 @@ private constructor( return true } - return /* spotless:off */ other is PaymentCreateResponse && this.paymentId == other.paymentId && this.payDate == other.payDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PaymentCreateResponse && paymentId == other.paymentId && payDate == other.payDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paymentId, payDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paymentId, payDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PaymentCreateResponse{paymentId=$paymentId, payDate=$payDate, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentEvent.kt index d83b7532..02d64e4d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PaymentEvent.kt @@ -292,17 +292,14 @@ private constructor( return true } - return /* spotless:off */ other is PaymentIdentifiers && this.paymentId == other.paymentId && this.payDate == other.payDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PaymentIdentifiers && paymentId == other.paymentId && payDate == other.payDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paymentId, payDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paymentId, payDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PaymentIdentifiers{paymentId=$paymentId, payDate=$payDate, additionalProperties=$additionalProperties}" @@ -321,7 +318,7 @@ private constructor( return true } - return /* spotless:off */ other is EventType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EventType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -376,17 +373,14 @@ private constructor( return true } - return /* spotless:off */ other is PaymentEvent && this.connectionId == other.connectionId && this.companyId == other.companyId && this.accountId == other.accountId && this.eventType == other.eventType && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PaymentEvent && connectionId == other.connectionId && companyId == other.companyId && accountId == other.accountId && eventType == other.eventType && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionId, companyId, accountId, eventType, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PaymentEvent{connectionId=$connectionId, companyId=$companyId, accountId=$accountId, eventType=$eventType, data=$data, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt index 55cfc759..fbc6589d 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is PayrollPayGroupListPage && this.payGroupsService == other.payGroupsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is PayrollPayGroupListPage && payGroupsService == other.payGroupsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(payGroupsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(payGroupsService, params, response) /* spotless:on */ override fun toString() = "PayrollPayGroupListPage{payGroupsService=$payGroupsService, params=$params, response=$response}" @@ -106,15 +104,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "PayrollPayGroupListPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt index 78d73855..915dd966 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is PayrollPayGroupListPageAsync && this.payGroupsService == other.payGroupsService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is PayrollPayGroupListPageAsync && payGroupsService == other.payGroupsService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(payGroupsService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(payGroupsService, params, response) /* spotless:on */ override fun toString() = "PayrollPayGroupListPageAsync{payGroupsService=$payGroupsService, params=$params, response=$response}" @@ -109,15 +107,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "PayrollPayGroupListPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt index b0b6f3f1..fbafe465 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupListParams.kt @@ -22,6 +22,10 @@ constructor( fun payFrequencies(): Optional> = Optional.ofNullable(payFrequencies) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic @@ -33,25 +37,6 @@ constructor( return queryParams.build() } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is PayrollPayGroupListParams && this.individualId == other.individualId && this.payFrequencies == other.payFrequencies && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualId, payFrequencies, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "PayrollPayGroupListParams{individualId=$individualId, payFrequencies=$payFrequencies, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -69,10 +54,11 @@ constructor( @JvmSynthetic internal fun from(payrollPayGroupListParams: PayrollPayGroupListParams) = apply { - this.individualId = payrollPayGroupListParams.individualId - this.payFrequencies(payrollPayGroupListParams.payFrequencies ?: listOf()) - additionalHeaders(payrollPayGroupListParams.additionalHeaders) - additionalQueryParams(payrollPayGroupListParams.additionalQueryParams) + individualId = payrollPayGroupListParams.individualId + payFrequencies = + payrollPayGroupListParams.payFrequencies?.toMutableList() ?: mutableListOf() + additionalHeaders = payrollPayGroupListParams.additionalHeaders.toBuilder() + additionalQueryParams = payrollPayGroupListParams.additionalQueryParams.toBuilder() } fun individualId(individualId: String) = apply { this.individualId = individualId } @@ -185,9 +171,22 @@ constructor( fun build(): PayrollPayGroupListParams = PayrollPayGroupListParams( individualId, - if (payFrequencies.size == 0) null else payFrequencies.toImmutable(), + payFrequencies.toImmutable().ifEmpty { null }, additionalHeaders.build(), additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is PayrollPayGroupListParams && individualId == other.individualId && payFrequencies == other.payFrequencies && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualId, payFrequencies, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "PayrollPayGroupListParams{individualId=$individualId, payFrequencies=$payFrequencies, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt index b3002fe7..0397d454 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/PayrollPayGroupRetrieveParams.kt @@ -17,6 +17,10 @@ constructor( fun payGroupId(): String = payGroupId + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams @@ -28,25 +32,6 @@ constructor( } } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is PayrollPayGroupRetrieveParams && this.payGroupId == other.payGroupId && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(payGroupId, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "PayrollPayGroupRetrieveParams{payGroupId=$payGroupId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -63,9 +48,9 @@ constructor( @JvmSynthetic internal fun from(payrollPayGroupRetrieveParams: PayrollPayGroupRetrieveParams) = apply { - this.payGroupId = payrollPayGroupRetrieveParams.payGroupId - additionalHeaders(payrollPayGroupRetrieveParams.additionalHeaders) - additionalQueryParams(payrollPayGroupRetrieveParams.additionalQueryParams) + payGroupId = payrollPayGroupRetrieveParams.payGroupId + additionalHeaders = payrollPayGroupRetrieveParams.additionalHeaders.toBuilder() + additionalQueryParams = payrollPayGroupRetrieveParams.additionalQueryParams.toBuilder() } fun payGroupId(payGroupId: String) = apply { this.payGroupId = payGroupId } @@ -175,4 +160,17 @@ constructor( additionalQueryParams.build(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is PayrollPayGroupRetrieveParams && payGroupId == other.payGroupId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(payGroupId, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "PayrollPayGroupRetrieveParams{payGroupId=$payGroupId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Provider.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Provider.kt index 09e3b653..5528ce08 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Provider.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/Provider.kt @@ -983,17 +983,14 @@ private constructor( return true } - return /* spotless:off */ other is Accounts && this.routingNumber == other.routingNumber && this.accountName == other.accountName && this.institutionName == other.institutionName && this.accountType == other.accountType && this.accountNumber == other.accountNumber && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Accounts && routingNumber == other.routingNumber && accountName == other.accountName && institutionName == other.institutionName && accountType == other.accountType && accountNumber == other.accountNumber && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Accounts{routingNumber=$routingNumber, accountName=$accountName, institutionName=$institutionName, accountType=$accountType, accountNumber=$accountNumber, additionalProperties=$additionalProperties}" @@ -1161,17 +1158,14 @@ private constructor( return true } - return /* spotless:off */ other is Parent && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Parent && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Parent{name=$name, additionalProperties=$additionalProperties}" @@ -1182,17 +1176,14 @@ private constructor( return true } - return /* spotless:off */ other is Departments && this.name == other.name && this.parent == other.parent && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Departments && name == other.name && parent == other.parent && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, parent, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, parent, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Departments{name=$name, parent=$parent, additionalProperties=$additionalProperties}" @@ -1291,17 +1282,14 @@ private constructor( return true } - return /* spotless:off */ other is Entity && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Entity && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Entity{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -1463,17 +1451,14 @@ private constructor( return true } - return /* spotless:off */ other is Locations && this.line1 == other.line1 && this.line2 == other.line2 && this.city == other.city && this.state == other.state && this.postalCode == other.postalCode && this.country == other.country && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Locations && line1 == other.line1 && line2 == other.line2 && city == other.city && state == other.state && postalCode == other.postalCode && country == other.country && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Locations{line1=$line1, line2=$line2, city=$city, state=$state, postalCode=$postalCode, country=$country, additionalProperties=$additionalProperties}" @@ -1484,17 +1469,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedCompanyFields && this.id == other.id && this.legalName == other.legalName && this.entity == other.entity && this.primaryEmail == other.primaryEmail && this.primaryPhoneNumber == other.primaryPhoneNumber && this.ein == other.ein && this.accounts == other.accounts && this.departments == other.departments && this.locations == other.locations && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedCompanyFields && id == other.id && legalName == other.legalName && entity == other.entity && primaryEmail == other.primaryEmail && primaryPhoneNumber == other.primaryPhoneNumber && ein == other.ein && accounts == other.accounts && departments == other.departments && locations == other.locations && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, legalName, entity, primaryEmail, primaryPhoneNumber, ein, accounts, departments, locations, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, legalName, entity, primaryEmail, primaryPhoneNumber, ein, accounts, departments, locations, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedCompanyFields{id=$id, legalName=$legalName, entity=$entity, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, ein=$ein, accounts=$accounts, departments=$departments, locations=$locations, additionalProperties=$additionalProperties}" @@ -1841,17 +1823,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" @@ -1862,17 +1841,14 @@ private constructor( return true } - return /* spotless:off */ other is Individuals && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.isActive == other.isActive && this.department == other.department && this.manager == other.manager && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Individuals && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && isActive == other.isActive && department == other.department && manager == other.manager && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, isActive, department, manager, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, isActive, department, manager, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Individuals{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, isActive=$isActive, department=$department, manager=$manager, additionalProperties=$additionalProperties}" @@ -1971,17 +1947,14 @@ private constructor( return true } - return /* spotless:off */ other is Paging && this.count == other.count && this.offset == other.offset && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Paging && count == other.count && offset == other.offset && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(count, offset, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(count, offset, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Paging{count=$count, offset=$offset, additionalProperties=$additionalProperties}" @@ -1992,17 +1965,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedDirectoryFields && this.paging == other.paging && this.individuals == other.individuals && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedDirectoryFields && paging == other.paging && individuals == other.individuals && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paging, individuals, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paging, individuals, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedDirectoryFields{paging=$paging, individuals=$individuals, additionalProperties=$additionalProperties}" @@ -2410,17 +2380,14 @@ private constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -2519,17 +2486,14 @@ private constructor( return true } - return /* spotless:off */ other is Employment && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Employment && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Employment{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -2646,17 +2610,14 @@ private constructor( return true } - return /* spotless:off */ other is Income && this.amount == other.amount && this.currency == other.currency && this.unit == other.unit && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Income && amount == other.amount && currency == other.currency && unit == other.unit && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(amount, currency, unit, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(amount, currency, unit, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Income{amount=$amount, currency=$currency, unit=$unit, additionalProperties=$additionalProperties}" @@ -2818,17 +2779,14 @@ private constructor( return true } - return /* spotless:off */ other is Location && this.line1 == other.line1 && this.line2 == other.line2 && this.city == other.city && this.state == other.state && this.postalCode == other.postalCode && this.country == other.country && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Location && line1 == other.line1 && line2 == other.line2 && city == other.city && state == other.state && postalCode == other.postalCode && country == other.country && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(line1, line2, city, state, postalCode, country, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Location{line1=$line1, line2=$line2, city=$city, state=$state, postalCode=$postalCode, country=$country, additionalProperties=$additionalProperties}" @@ -2907,17 +2865,14 @@ private constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" @@ -2928,17 +2883,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedEmploymentFields && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.title == other.title && this.startDate == other.startDate && this.endDate == other.endDate && this.isActive == other.isActive && this.incomeHistory == other.incomeHistory && this.classCode == other.classCode && this.customFields == other.customFields && this.department == other.department && this.employment == other.employment && this.income == other.income && this.location == other.location && this.manager == other.manager && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedEmploymentFields && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && title == other.title && startDate == other.startDate && endDate == other.endDate && isActive == other.isActive && incomeHistory == other.incomeHistory && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && income == other.income && location == other.location && manager == other.manager && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, title, startDate, endDate, isActive, incomeHistory, classCode, customFields, department, employment, income, location, manager, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, title, startDate, endDate, isActive, incomeHistory, classCode, customFields, department, employment, income, location, manager, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedEmploymentFields{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, title=$title, startDate=$startDate, endDate=$endDate, isActive=$isActive, incomeHistory=$incomeHistory, classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, income=$income, location=$location, manager=$manager, additionalProperties=$additionalProperties}" @@ -3313,17 +3265,14 @@ private constructor( return true } - return /* spotless:off */ other is Emails && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Emails && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Emails{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -3421,17 +3370,14 @@ private constructor( return true } - return /* spotless:off */ other is PhoneNumbers && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PhoneNumbers && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PhoneNumbers{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -3593,17 +3539,14 @@ private constructor( return true } - return /* spotless:off */ other is Residence && this.city == other.city && this.country == other.country && this.line1 == other.line1 && this.line2 == other.line2 && this.postalCode == other.postalCode && this.state == other.state && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Residence && city == other.city && country == other.country && line1 == other.line1 && line2 == other.line2 && postalCode == other.postalCode && state == other.state && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(city, country, line1, line2, postalCode, state, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Residence{city=$city, country=$country, line1=$line1, line2=$line2, postalCode=$postalCode, state=$state, additionalProperties=$additionalProperties}" @@ -3614,17 +3557,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedIndividualFields && this.id == other.id && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.preferredName == other.preferredName && this.dob == other.dob && this.gender == other.gender && this.ethnicity == other.ethnicity && this.ssn == other.ssn && this.encryptedSsn == other.encryptedSsn && this.emails == other.emails && this.phoneNumbers == other.phoneNumbers && this.residence == other.residence && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedIndividualFields && id == other.id && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && preferredName == other.preferredName && dob == other.dob && gender == other.gender && ethnicity == other.ethnicity && ssn == other.ssn && encryptedSsn == other.encryptedSsn && emails == other.emails && phoneNumbers == other.phoneNumbers && residence == other.residence && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, firstName, middleName, lastName, preferredName, dob, gender, ethnicity, ssn, encryptedSsn, emails, phoneNumbers, residence, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, firstName, middleName, lastName, preferredName, dob, gender, ethnicity, ssn, encryptedSsn, emails, phoneNumbers, residence, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedIndividualFields{id=$id, firstName=$firstName, middleName=$middleName, lastName=$lastName, preferredName=$preferredName, dob=$dob, gender=$gender, ethnicity=$ethnicity, ssn=$ssn, encryptedSsn=$encryptedSsn, emails=$emails, phoneNumbers=$phoneNumbers, residence=$residence, additionalProperties=$additionalProperties}" @@ -3761,17 +3701,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedPayGroupFields && this.id == other.id && this.name == other.name && this.payFrequencies == other.payFrequencies && this.individualIds == other.individualIds && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedPayGroupFields && id == other.id && name == other.name && payFrequencies == other.payFrequencies && individualIds == other.individualIds && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, name, payFrequencies, individualIds, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, name, payFrequencies, individualIds, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedPayGroupFields{id=$id, name=$name, payFrequencies=$payFrequencies, individualIds=$individualIds, additionalProperties=$additionalProperties}" @@ -3960,17 +3897,14 @@ private constructor( return true } - return /* spotless:off */ other is Paging && this.count == other.count && this.offset == other.offset && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Paging && count == other.count && offset == other.offset && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(count, offset, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(count, offset, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Paging{count=$count, offset=$offset, additionalProperties=$additionalProperties}" @@ -4350,17 +4284,14 @@ private constructor( return true } - return /* spotless:off */ other is Earnings && this.type == other.type && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Earnings && type == other.type && name == other.name && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Earnings{type=$type, name=$name, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -4510,17 +4441,14 @@ private constructor( return true } - return /* spotless:off */ other is EmployeeDeductions && this.name == other.name && this.amount == other.amount && this.type == other.type && this.preTax == other.preTax && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployeeDeductions && name == other.name && amount == other.amount && type == other.type && preTax == other.preTax && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, type, preTax, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, type, preTax, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployeeDeductions{name=$name, amount=$amount, type=$type, preTax=$preTax, currency=$currency, additionalProperties=$additionalProperties}" @@ -4639,17 +4567,14 @@ private constructor( return true } - return /* spotless:off */ other is EmployerContributions && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployerContributions && name == other.name && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployerContributions{name=$name, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -4801,17 +4726,14 @@ private constructor( return true } - return /* spotless:off */ other is Taxes && this.type == other.type && this.name == other.name && this.employer == other.employer && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Taxes && type == other.type && name == other.name && employer == other.employer && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, employer, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, employer, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Taxes{type=$type, name=$name, employer=$employer, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -4822,17 +4744,14 @@ private constructor( return true } - return /* spotless:off */ other is PayStatements && this.individualId == other.individualId && this.type == other.type && this.paymentMethod == other.paymentMethod && this.totalHours == other.totalHours && this.grossPay == other.grossPay && this.netPay == other.netPay && this.earnings == other.earnings && this.employeeDeductions == other.employeeDeductions && this.employerContributions == other.employerContributions && this.taxes == other.taxes && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatements && individualId == other.individualId && type == other.type && paymentMethod == other.paymentMethod && totalHours == other.totalHours && grossPay == other.grossPay && netPay == other.netPay && earnings == other.earnings && employeeDeductions == other.employeeDeductions && employerContributions == other.employerContributions && taxes == other.taxes && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, employeeDeductions, employerContributions, taxes, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, employeeDeductions, employerContributions, taxes, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatements{individualId=$individualId, type=$type, paymentMethod=$paymentMethod, totalHours=$totalHours, grossPay=$grossPay, netPay=$netPay, earnings=$earnings, employeeDeductions=$employeeDeductions, employerContributions=$employerContributions, taxes=$taxes, additionalProperties=$additionalProperties}" @@ -4843,17 +4762,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedPayStatementFields && this.paging == other.paging && this.payStatements == other.payStatements && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedPayStatementFields && paging == other.paging && payStatements == other.payStatements && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(paging, payStatements, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(paging, payStatements, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedPayStatementFields{paging=$paging, payStatements=$payStatements, additionalProperties=$additionalProperties}" @@ -5224,17 +5140,14 @@ private constructor( return true } - return /* spotless:off */ other is PayPeriod && this.startDate == other.startDate && this.endDate == other.endDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayPeriod && startDate == other.startDate && endDate == other.endDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(startDate, endDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(startDate, endDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayPeriod{startDate=$startDate, endDate=$endDate, additionalProperties=$additionalProperties}" @@ -5245,17 +5158,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedPaymentFields && this.id == other.id && this.payDate == other.payDate && this.debitDate == other.debitDate && this.companyDebit == other.companyDebit && this.grossPay == other.grossPay && this.netPay == other.netPay && this.employerTaxes == other.employerTaxes && this.employeeTaxes == other.employeeTaxes && this.individualIds == other.individualIds && this.payPeriod == other.payPeriod && this.payGroupIds == other.payGroupIds && this.payFrequencies == other.payFrequencies && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedPaymentFields && id == other.id && payDate == other.payDate && debitDate == other.debitDate && companyDebit == other.companyDebit && grossPay == other.grossPay && netPay == other.netPay && employerTaxes == other.employerTaxes && employeeTaxes == other.employeeTaxes && individualIds == other.individualIds && payPeriod == other.payPeriod && payGroupIds == other.payGroupIds && payFrequencies == other.payFrequencies && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, payDate, debitDate, companyDebit, grossPay, netPay, employerTaxes, employeeTaxes, individualIds, payPeriod, payGroupIds, payFrequencies, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, payDate, debitDate, companyDebit, grossPay, netPay, employerTaxes, employeeTaxes, individualIds, payPeriod, payGroupIds, payFrequencies, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedPaymentFields{id=$id, payDate=$payDate, debitDate=$debitDate, companyDebit=$companyDebit, grossPay=$grossPay, netPay=$netPay, employerTaxes=$employerTaxes, employeeTaxes=$employeeTaxes, individualIds=$individualIds, payPeriod=$payPeriod, payGroupIds=$payGroupIds, payFrequencies=$payFrequencies, additionalProperties=$additionalProperties}" @@ -5266,17 +5176,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedFields && this.company == other.company && this.directory == other.directory && this.individual == other.individual && this.employment == other.employment && this.payment == other.payment && this.payStatement == other.payStatement && this.payGroup == other.payGroup && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedFields && company == other.company && directory == other.directory && individual == other.individual && employment == other.employment && payment == other.payment && payStatement == other.payStatement && payGroup == other.payGroup && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(company, directory, individual, employment, payment, payStatement, payGroup, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(company, directory, individual, employment, payment, payStatement, payGroup, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedFields{company=$company, directory=$directory, individual=$individual, employment=$employment, payment=$payment, payStatement=$payStatement, payGroup=$payGroup, additionalProperties=$additionalProperties}" @@ -5295,7 +5202,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -5362,17 +5269,14 @@ private constructor( return true } - return /* spotless:off */ other is AuthenticationMethod && this.type == other.type && this.benefitsSupport == other.benefitsSupport && this.supportedFields == other.supportedFields && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is AuthenticationMethod && type == other.type && benefitsSupport == other.benefitsSupport && supportedFields == other.supportedFields && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, benefitsSupport, supportedFields, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, benefitsSupport, supportedFields, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "AuthenticationMethod{type=$type, benefitsSupport=$benefitsSupport, supportedFields=$supportedFields, additionalProperties=$additionalProperties}" @@ -5383,17 +5287,14 @@ private constructor( return true } - return /* spotless:off */ other is Provider && this.id == other.id && this.displayName == other.displayName && this.products == other.products && this.icon == other.icon && this.logo == other.logo && this.mfaRequired == other.mfaRequired && this.primaryColor == other.primaryColor && this.manual == other.manual && this.beta == other.beta && this.authenticationMethods == other.authenticationMethods && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Provider && id == other.id && displayName == other.displayName && products == other.products && icon == other.icon && logo == other.logo && mfaRequired == other.mfaRequired && primaryColor == other.primaryColor && manual == other.manual && beta == other.beta && authenticationMethods == other.authenticationMethods && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, displayName, products, icon, logo, mfaRequired, primaryColor, manual, beta, authenticationMethods, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, displayName, products, icon, logo, mfaRequired, primaryColor, manual, beta, authenticationMethods, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Provider{id=$id, displayName=$displayName, products=$products, icon=$icon, logo=$logo, mfaRequired=$mfaRequired, primaryColor=$primaryColor, manual=$manual, beta=$beta, authenticationMethods=$authenticationMethods, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt index 6f5387c7..9496f5c8 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPage.kt @@ -34,12 +34,10 @@ private constructor( return true } - return /* spotless:off */ other is ProviderListPage && this.providersService == other.providersService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is ProviderListPage && providersService == other.providersService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(providersService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(providersService, params, response) /* spotless:on */ override fun toString() = "ProviderListPage{providersService=$providersService, params=$params, response=$response}" @@ -102,15 +100,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "ProviderListPage.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt index cb75af3e..6344fb83 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListPageAsync.kt @@ -35,12 +35,10 @@ private constructor( return true } - return /* spotless:off */ other is ProviderListPageAsync && this.providersService == other.providersService && this.params == other.params && this.response == other.response /* spotless:on */ + return /* spotless:off */ other is ProviderListPageAsync && providersService == other.providersService && params == other.params && response == other.response /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(providersService, params, response) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(providersService, params, response) /* spotless:on */ override fun toString() = "ProviderListPageAsync{providersService=$providersService, params=$params, response=$response}" @@ -109,15 +107,13 @@ private constructor( return true } - return /* spotless:off */ other is Response && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Response && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */ override fun toString() = - "ProviderListPageAsync.Response{items=$items, additionalProperties=$additionalProperties}" + "Response{items=$items, additionalProperties=$additionalProperties}" companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt index 2e12e9ee..adeb608e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/ProviderListParams.kt @@ -14,28 +14,13 @@ constructor( private val additionalQueryParams: QueryParams, ) { - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is ProviderListParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "ProviderListParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -52,8 +37,8 @@ constructor( @JvmSynthetic internal fun from(providerListParams: ProviderListParams) = apply { - additionalHeaders(providerListParams.additionalHeaders) - additionalQueryParams(providerListParams.additionalQueryParams) + additionalHeaders = providerListParams.additionalHeaders.toBuilder() + additionalQueryParams = providerListParams.additionalQueryParams.toBuilder() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -157,4 +142,17 @@ constructor( fun build(): ProviderListParams = ProviderListParams(additionalHeaders.build(), additionalQueryParams.build()) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is ProviderListParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "ProviderListParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt index adfeee89..31fb11cd 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardParams.kt @@ -38,6 +38,12 @@ constructor( fun params(): Optional = Optional.ofNullable(params) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): RequestForwardingForwardBody { return RequestForwardingForwardBody( @@ -191,43 +197,19 @@ constructor( return true } - return /* spotless:off */ other is RequestForwardingForwardBody && this.method == other.method && this.route == other.route && this.data == other.data && this.headers == other.headers && this.params == other.params && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is RequestForwardingForwardBody && method == other.method && route == other.route && data == other.data && headers == other.headers && params == other.params && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(method, route, data, headers, params, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(method, route, data, headers, params, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "RequestForwardingForwardBody{method=$method, route=$route, data=$data, headers=$headers, params=$params, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is RequestForwardingForwardParams && this.method == other.method && this.route == other.route && this.data == other.data && this.headers == other.headers && this.params == other.params && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(method, route, data, headers, params, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "RequestForwardingForwardParams{method=$method, route=$route, data=$data, headers=$headers, params=$params, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -249,14 +231,15 @@ constructor( @JvmSynthetic internal fun from(requestForwardingForwardParams: RequestForwardingForwardParams) = apply { - this.method = requestForwardingForwardParams.method - this.route = requestForwardingForwardParams.route - this.data = requestForwardingForwardParams.data - this.headers = requestForwardingForwardParams.headers - this.params = requestForwardingForwardParams.params - additionalHeaders(requestForwardingForwardParams.additionalHeaders) - additionalQueryParams(requestForwardingForwardParams.additionalQueryParams) - additionalBodyProperties(requestForwardingForwardParams.additionalBodyProperties) + method = requestForwardingForwardParams.method + route = requestForwardingForwardParams.route + data = requestForwardingForwardParams.data + headers = requestForwardingForwardParams.headers + params = requestForwardingForwardParams.params + additionalHeaders = requestForwardingForwardParams.additionalHeaders.toBuilder() + additionalQueryParams = requestForwardingForwardParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + requestForwardingForwardParams.additionalBodyProperties.toMutableMap() } /** @@ -422,4 +405,17 @@ constructor( additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is RequestForwardingForwardParams && method == other.method && route == other.route && data == other.data && headers == other.headers && params == other.params && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(method, route, data, headers, params, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "RequestForwardingForwardParams{method=$method, route=$route, data=$data, headers=$headers, params=$params, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponse.kt index f8d47f23..ab743f7e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponse.kt @@ -368,17 +368,14 @@ private constructor( return true } - return /* spotless:off */ other is Request && this.method == other.method && this.route == other.route && this.headers == other.headers && this.params == other.params && this.data == other.data && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Request && method == other.method && route == other.route && headers == other.headers && params == other.params && data == other.data && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(method, route, headers, params, data, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(method, route, headers, params, data, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Request{method=$method, route=$route, headers=$headers, params=$params, data=$data, additionalProperties=$additionalProperties}" @@ -389,17 +386,14 @@ private constructor( return true } - return /* spotless:off */ other is RequestForwardingForwardResponse && this.headers == other.headers && this.statusCode == other.statusCode && this.data == other.data && this.request == other.request && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is RequestForwardingForwardResponse && headers == other.headers && statusCode == other.statusCode && data == other.data && request == other.request && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(headers, statusCode, data, request, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(headers, statusCode, data, request, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "RequestForwardingForwardResponse{headers=$headers, statusCode=$statusCode, data=$data, request=$request, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt index 43fa77dd..587b47f6 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxCompanyUpdateParams.kt @@ -51,6 +51,12 @@ constructor( fun primaryPhoneNumber(): Optional = Optional.ofNullable(primaryPhoneNumber) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxCompanyUpdateBody { return SandboxCompanyUpdateBody( @@ -210,43 +216,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxCompanyUpdateBody && this.accounts == other.accounts && this.departments == other.departments && this.ein == other.ein && this.entity == other.entity && this.legalName == other.legalName && this.locations == other.locations && this.primaryEmail == other.primaryEmail && this.primaryPhoneNumber == other.primaryPhoneNumber && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxCompanyUpdateBody && accounts == other.accounts && departments == other.departments && ein == other.ein && entity == other.entity && legalName == other.legalName && locations == other.locations && primaryEmail == other.primaryEmail && primaryPhoneNumber == other.primaryPhoneNumber && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(accounts, departments, ein, entity, legalName, locations, primaryEmail, primaryPhoneNumber, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(accounts, departments, ein, entity, legalName, locations, primaryEmail, primaryPhoneNumber, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxCompanyUpdateBody{accounts=$accounts, departments=$departments, ein=$ein, entity=$entity, legalName=$legalName, locations=$locations, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxCompanyUpdateParams && this.accounts == other.accounts && this.departments == other.departments && this.ein == other.ein && this.entity == other.entity && this.legalName == other.legalName && this.locations == other.locations && this.primaryEmail == other.primaryEmail && this.primaryPhoneNumber == other.primaryPhoneNumber && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(accounts, departments, ein, entity, legalName, locations, primaryEmail, primaryPhoneNumber, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxCompanyUpdateParams{accounts=$accounts, departments=$departments, ein=$ein, entity=$entity, legalName=$legalName, locations=$locations, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -271,17 +253,18 @@ constructor( @JvmSynthetic internal fun from(sandboxCompanyUpdateParams: SandboxCompanyUpdateParams) = apply { - this.accounts(sandboxCompanyUpdateParams.accounts ?: listOf()) - this.departments(sandboxCompanyUpdateParams.departments ?: listOf()) - this.ein = sandboxCompanyUpdateParams.ein - this.entity = sandboxCompanyUpdateParams.entity - this.legalName = sandboxCompanyUpdateParams.legalName - this.locations(sandboxCompanyUpdateParams.locations ?: listOf()) - this.primaryEmail = sandboxCompanyUpdateParams.primaryEmail - this.primaryPhoneNumber = sandboxCompanyUpdateParams.primaryPhoneNumber - additionalHeaders(sandboxCompanyUpdateParams.additionalHeaders) - additionalQueryParams(sandboxCompanyUpdateParams.additionalQueryParams) - additionalBodyProperties(sandboxCompanyUpdateParams.additionalBodyProperties) + accounts = sandboxCompanyUpdateParams.accounts?.toMutableList() ?: mutableListOf() + departments = sandboxCompanyUpdateParams.departments?.toMutableList() ?: mutableListOf() + ein = sandboxCompanyUpdateParams.ein + entity = sandboxCompanyUpdateParams.entity + legalName = sandboxCompanyUpdateParams.legalName + locations = sandboxCompanyUpdateParams.locations?.toMutableList() ?: mutableListOf() + primaryEmail = sandboxCompanyUpdateParams.primaryEmail + primaryPhoneNumber = sandboxCompanyUpdateParams.primaryPhoneNumber + additionalHeaders = sandboxCompanyUpdateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxCompanyUpdateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxCompanyUpdateParams.additionalBodyProperties.toMutableMap() } /** An array of bank account objects associated with the payroll/HRIS system. */ @@ -448,12 +431,12 @@ constructor( fun build(): SandboxCompanyUpdateParams = SandboxCompanyUpdateParams( - if (accounts.size == 0) null else accounts.toImmutable(), - if (departments.size == 0) null else departments.toImmutable(), + accounts.toImmutable().ifEmpty { null }, + departments.toImmutable().ifEmpty { null }, ein, entity, legalName, - if (locations.size == 0) null else locations.toImmutable(), + locations.toImmutable().ifEmpty { null }, primaryEmail, primaryPhoneNumber, additionalHeaders.build(), @@ -584,7 +567,7 @@ constructor( return true } - return /* spotless:off */ other is AccountType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AccountType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -633,17 +616,14 @@ constructor( return true } - return /* spotless:off */ other is Account && this.routingNumber == other.routingNumber && this.accountName == other.accountName && this.institutionName == other.institutionName && this.accountType == other.accountType && this.accountNumber == other.accountNumber && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Account && routingNumber == other.routingNumber && accountName == other.accountName && institutionName == other.institutionName && accountType == other.accountType && accountNumber == other.accountNumber && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(routingNumber, accountName, institutionName, accountType, accountNumber, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Account{routingNumber=$routingNumber, accountName=$accountName, institutionName=$institutionName, accountType=$accountType, accountNumber=$accountNumber, additionalProperties=$additionalProperties}" @@ -776,17 +756,14 @@ constructor( return true } - return /* spotless:off */ other is Parent && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Parent && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Parent{name=$name, additionalProperties=$additionalProperties}" @@ -797,17 +774,14 @@ constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.parent == other.parent && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && parent == other.parent && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, parent, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, parent, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, parent=$parent, additionalProperties=$additionalProperties}" @@ -895,7 +869,7 @@ constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -958,7 +932,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1037,19 +1011,29 @@ constructor( return true } - return /* spotless:off */ other is Entity && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Entity && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Entity{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxCompanyUpdateParams && accounts == other.accounts && departments == other.departments && ein == other.ein && entity == other.entity && legalName == other.legalName && locations == other.locations && primaryEmail == other.primaryEmail && primaryPhoneNumber == other.primaryPhoneNumber && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(accounts, departments, ein, entity, legalName, locations, primaryEmail, primaryPhoneNumber, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxCompanyUpdateParams{accounts=$accounts, departments=$departments, ein=$ein, entity=$entity, legalName=$legalName, locations=$locations, primaryEmail=$primaryEmail, primaryPhoneNumber=$primaryPhoneNumber, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt index abd4c202..fcd9f008 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountCreateParams.kt @@ -39,6 +39,12 @@ constructor( fun products(): Optional> = Optional.ofNullable(products) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxConnectionAccountCreateBody { return SandboxConnectionAccountCreateBody( @@ -157,43 +163,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxConnectionAccountCreateBody && this.companyId == other.companyId && this.providerId == other.providerId && this.authenticationType == other.authenticationType && this.products == other.products && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxConnectionAccountCreateBody && companyId == other.companyId && providerId == other.providerId && authenticationType == other.authenticationType && products == other.products && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(companyId, providerId, authenticationType, products, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(companyId, providerId, authenticationType, products, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxConnectionAccountCreateBody{companyId=$companyId, providerId=$providerId, authenticationType=$authenticationType, products=$products, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxConnectionAccountCreateParams && this.companyId == other.companyId && this.providerId == other.providerId && this.authenticationType == other.authenticationType && this.products == other.products && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(companyId, providerId, authenticationType, products, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxConnectionAccountCreateParams{companyId=$companyId, providerId=$providerId, authenticationType=$authenticationType, products=$products, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -216,13 +198,16 @@ constructor( internal fun from( sandboxConnectionAccountCreateParams: SandboxConnectionAccountCreateParams ) = apply { - this.companyId = sandboxConnectionAccountCreateParams.companyId - this.providerId = sandboxConnectionAccountCreateParams.providerId - this.authenticationType = sandboxConnectionAccountCreateParams.authenticationType - this.products(sandboxConnectionAccountCreateParams.products ?: listOf()) - additionalHeaders(sandboxConnectionAccountCreateParams.additionalHeaders) - additionalQueryParams(sandboxConnectionAccountCreateParams.additionalQueryParams) - additionalBodyProperties(sandboxConnectionAccountCreateParams.additionalBodyProperties) + companyId = sandboxConnectionAccountCreateParams.companyId + providerId = sandboxConnectionAccountCreateParams.providerId + authenticationType = sandboxConnectionAccountCreateParams.authenticationType + products = + sandboxConnectionAccountCreateParams.products?.toMutableList() ?: mutableListOf() + additionalHeaders = sandboxConnectionAccountCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = + sandboxConnectionAccountCreateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxConnectionAccountCreateParams.additionalBodyProperties.toMutableMap() } fun companyId(companyId: String) = apply { this.companyId = companyId } @@ -374,7 +359,7 @@ constructor( checkNotNull(companyId) { "`companyId` is required but was not set" }, checkNotNull(providerId) { "`providerId` is required but was not set" }, authenticationType, - if (products.size == 0) null else products.toImmutable(), + products.toImmutable().ifEmpty { null }, additionalHeaders.build(), additionalQueryParams.build(), additionalBodyProperties.toImmutable(), @@ -394,7 +379,7 @@ constructor( return true } - return /* spotless:off */ other is AuthenticationType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AuthenticationType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -449,4 +434,17 @@ constructor( fun asString(): String = _value().asStringOrThrow() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxConnectionAccountCreateParams && companyId == other.companyId && providerId == other.providerId && authenticationType == other.authenticationType && products == other.products && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(companyId, providerId, authenticationType, products, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxConnectionAccountCreateParams{companyId=$companyId, providerId=$providerId, authenticationType=$authenticationType, products=$products, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt index 7301ab93..37a2baab 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionAccountUpdateParams.kt @@ -26,6 +26,12 @@ constructor( fun connectionStatus(): Optional = Optional.ofNullable(connectionStatus) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxConnectionAccountUpdateBody { return SandboxConnectionAccountUpdateBody(connectionStatus, additionalBodyProperties) @@ -101,43 +107,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxConnectionAccountUpdateBody && this.connectionStatus == other.connectionStatus && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxConnectionAccountUpdateBody && connectionStatus == other.connectionStatus && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(connectionStatus, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(connectionStatus, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxConnectionAccountUpdateBody{connectionStatus=$connectionStatus, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxConnectionAccountUpdateParams && this.connectionStatus == other.connectionStatus && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(connectionStatus, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxConnectionAccountUpdateParams{connectionStatus=$connectionStatus, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -157,10 +139,12 @@ constructor( internal fun from( sandboxConnectionAccountUpdateParams: SandboxConnectionAccountUpdateParams ) = apply { - this.connectionStatus = sandboxConnectionAccountUpdateParams.connectionStatus - additionalHeaders(sandboxConnectionAccountUpdateParams.additionalHeaders) - additionalQueryParams(sandboxConnectionAccountUpdateParams.additionalQueryParams) - additionalBodyProperties(sandboxConnectionAccountUpdateParams.additionalBodyProperties) + connectionStatus = sandboxConnectionAccountUpdateParams.connectionStatus + additionalHeaders = sandboxConnectionAccountUpdateParams.additionalHeaders.toBuilder() + additionalQueryParams = + sandboxConnectionAccountUpdateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxConnectionAccountUpdateParams.additionalBodyProperties.toMutableMap() } fun connectionStatus(connectionStatus: ConnectionStatusType) = apply { @@ -295,4 +279,17 @@ constructor( additionalBodyProperties.toImmutable(), ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxConnectionAccountUpdateParams && connectionStatus == other.connectionStatus && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(connectionStatus, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxConnectionAccountUpdateParams{connectionStatus=$connectionStatus, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt index f41027cd..23a29139 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParams.kt @@ -39,6 +39,12 @@ constructor( fun products(): Optional> = Optional.ofNullable(products) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxConnectionCreateBody { return SandboxConnectionCreateBody( @@ -157,43 +163,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxConnectionCreateBody && this.providerId == other.providerId && this.authenticationType == other.authenticationType && this.employeeSize == other.employeeSize && this.products == other.products && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxConnectionCreateBody && providerId == other.providerId && authenticationType == other.authenticationType && employeeSize == other.employeeSize && products == other.products && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(providerId, authenticationType, employeeSize, products, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(providerId, authenticationType, employeeSize, products, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxConnectionCreateBody{providerId=$providerId, authenticationType=$authenticationType, employeeSize=$employeeSize, products=$products, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxConnectionCreateParams && this.providerId == other.providerId && this.authenticationType == other.authenticationType && this.employeeSize == other.employeeSize && this.products == other.products && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(providerId, authenticationType, employeeSize, products, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxConnectionCreateParams{providerId=$providerId, authenticationType=$authenticationType, employeeSize=$employeeSize, products=$products, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -214,13 +196,14 @@ constructor( @JvmSynthetic internal fun from(sandboxConnectionCreateParams: SandboxConnectionCreateParams) = apply { - this.providerId = sandboxConnectionCreateParams.providerId - this.authenticationType = sandboxConnectionCreateParams.authenticationType - this.employeeSize = sandboxConnectionCreateParams.employeeSize - this.products(sandboxConnectionCreateParams.products ?: listOf()) - additionalHeaders(sandboxConnectionCreateParams.additionalHeaders) - additionalQueryParams(sandboxConnectionCreateParams.additionalQueryParams) - additionalBodyProperties(sandboxConnectionCreateParams.additionalBodyProperties) + providerId = sandboxConnectionCreateParams.providerId + authenticationType = sandboxConnectionCreateParams.authenticationType + employeeSize = sandboxConnectionCreateParams.employeeSize + products = sandboxConnectionCreateParams.products?.toMutableList() ?: mutableListOf() + additionalHeaders = sandboxConnectionCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxConnectionCreateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxConnectionCreateParams.additionalBodyProperties.toMutableMap() } /** The provider associated with the connection */ @@ -369,7 +352,7 @@ constructor( checkNotNull(providerId) { "`providerId` is required but was not set" }, authenticationType, employeeSize, - if (products.size == 0) null else products.toImmutable(), + products.toImmutable().ifEmpty { null }, additionalHeaders.build(), additionalQueryParams.build(), additionalBodyProperties.toImmutable(), @@ -389,7 +372,7 @@ constructor( return true } - return /* spotless:off */ other is AuthenticationType && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is AuthenticationType && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -444,4 +427,17 @@ constructor( fun asString(): String = _value().asStringOrThrow() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxConnectionCreateParams && providerId == other.providerId && authenticationType == other.authenticationType && employeeSize == other.employeeSize && products == other.products && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(providerId, authenticationType, employeeSize, products, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxConnectionCreateParams{providerId=$providerId, authenticationType=$authenticationType, employeeSize=$employeeSize, products=$products, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt index 78a23903..148b2f54 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParams.kt @@ -28,6 +28,10 @@ constructor( fun body(): List = body + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + @JvmSynthetic internal fun getBody(): List { return body @@ -83,40 +87,18 @@ constructor( return true } - return /* spotless:off */ other is SandboxDirectoryCreateBody && this.body == other.body /* spotless:on */ + return /* spotless:off */ other is SandboxDirectoryCreateBody && body == other.body /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(body) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(body) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxDirectoryCreateBody{body=$body}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxDirectoryCreateParams && this.body == other.body && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(body, additionalHeaders, additionalQueryParams) /* spotless:on */ - } - - override fun toString() = - "SandboxDirectoryCreateParams{body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" - fun toBuilder() = Builder().from(this) companion object { @@ -133,9 +115,9 @@ constructor( @JvmSynthetic internal fun from(sandboxDirectoryCreateParams: SandboxDirectoryCreateParams) = apply { - this.body(sandboxDirectoryCreateParams.body) - additionalHeaders(sandboxDirectoryCreateParams.additionalHeaders) - additionalQueryParams(sandboxDirectoryCreateParams.additionalQueryParams) + body = sandboxDirectoryCreateParams.body.toMutableList() + additionalHeaders = sandboxDirectoryCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxDirectoryCreateParams.additionalQueryParams.toBuilder() } /** @@ -253,7 +235,7 @@ constructor( fun build(): SandboxDirectoryCreateParams = SandboxDirectoryCreateParams( - checkNotNull(body) { "`body` is required but was not set" }.toImmutable(), + body.toImmutable(), additionalHeaders.build(), additionalQueryParams.build(), ) @@ -677,17 +659,14 @@ constructor( return true } - return /* spotless:off */ other is CustomField && this.name == other.name && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CustomField && name == other.name && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CustomField{name=$name, value=$value, additionalProperties=$additionalProperties}" @@ -753,17 +732,14 @@ constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -846,7 +822,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -895,17 +871,14 @@ constructor( return true } - return /* spotless:off */ other is Email && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Email && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Email{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -1000,7 +973,7 @@ constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1082,7 +1055,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1131,17 +1104,14 @@ constructor( return true } - return /* spotless:off */ other is Employment && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Employment && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Employment{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -1160,7 +1130,7 @@ constructor( return true } - return /* spotless:off */ other is Ethnicity && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Ethnicity && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1258,7 +1228,7 @@ constructor( return true } - return /* spotless:off */ other is Gender && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Gender && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1374,17 +1344,14 @@ constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" } @@ -1466,7 +1433,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1515,17 +1482,14 @@ constructor( return true } - return /* spotless:off */ other is PhoneNumber && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PhoneNumber && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PhoneNumber{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -1536,19 +1500,29 @@ constructor( return true } - return /* spotless:off */ other is IndividualOrEmployment && this.firstName == other.firstName && this.middleName == other.middleName && this.lastName == other.lastName && this.preferredName == other.preferredName && this.emails == other.emails && this.phoneNumbers == other.phoneNumbers && this.gender == other.gender && this.ethnicity == other.ethnicity && this.dob == other.dob && this.ssn == other.ssn && this.encryptedSsn == other.encryptedSsn && this.residence == other.residence && this.title == other.title && this.manager == other.manager && this.department == other.department && this.employment == other.employment && this.startDate == other.startDate && this.endDate == other.endDate && this.latestRehireDate == other.latestRehireDate && this.isActive == other.isActive && this.classCode == other.classCode && this.location == other.location && this.income == other.income && this.incomeHistory == other.incomeHistory && this.customFields == other.customFields && this.sourceId == other.sourceId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is IndividualOrEmployment && firstName == other.firstName && middleName == other.middleName && lastName == other.lastName && preferredName == other.preferredName && emails == other.emails && phoneNumbers == other.phoneNumbers && gender == other.gender && ethnicity == other.ethnicity && dob == other.dob && ssn == other.ssn && encryptedSsn == other.encryptedSsn && residence == other.residence && title == other.title && manager == other.manager && department == other.department && employment == other.employment && startDate == other.startDate && endDate == other.endDate && latestRehireDate == other.latestRehireDate && isActive == other.isActive && classCode == other.classCode && location == other.location && income == other.income && incomeHistory == other.incomeHistory && customFields == other.customFields && sourceId == other.sourceId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(firstName, middleName, lastName, preferredName, emails, phoneNumbers, gender, ethnicity, dob, ssn, encryptedSsn, residence, title, manager, department, employment, startDate, endDate, latestRehireDate, isActive, classCode, location, income, incomeHistory, customFields, sourceId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(firstName, middleName, lastName, preferredName, emails, phoneNumbers, gender, ethnicity, dob, ssn, encryptedSsn, residence, title, manager, department, employment, startDate, endDate, latestRehireDate, isActive, classCode, location, income, incomeHistory, customFields, sourceId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "IndividualOrEmployment{firstName=$firstName, middleName=$middleName, lastName=$lastName, preferredName=$preferredName, emails=$emails, phoneNumbers=$phoneNumbers, gender=$gender, ethnicity=$ethnicity, dob=$dob, ssn=$ssn, encryptedSsn=$encryptedSsn, residence=$residence, title=$title, manager=$manager, department=$department, employment=$employment, startDate=$startDate, endDate=$endDate, latestRehireDate=$latestRehireDate, isActive=$isActive, classCode=$classCode, location=$location, income=$income, incomeHistory=$incomeHistory, customFields=$customFields, sourceId=$sourceId, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxDirectoryCreateParams && body == other.body && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(body, additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "SandboxDirectoryCreateParams{body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt index b0de78b1..c7e1f146 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParams.kt @@ -81,6 +81,12 @@ constructor( fun title(): Optional = Optional.ofNullable(title) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxEmploymentUpdateBody { return SandboxEmploymentUpdateBody( @@ -365,43 +371,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxEmploymentUpdateBody && this.classCode == other.classCode && this.customFields == other.customFields && this.department == other.department && this.employment == other.employment && this.endDate == other.endDate && this.firstName == other.firstName && this.income == other.income && this.incomeHistory == other.incomeHistory && this.isActive == other.isActive && this.lastName == other.lastName && this.latestRehireDate == other.latestRehireDate && this.location == other.location && this.manager == other.manager && this.middleName == other.middleName && this.sourceId == other.sourceId && this.startDate == other.startDate && this.title == other.title && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxEmploymentUpdateBody && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && endDate == other.endDate && firstName == other.firstName && income == other.income && incomeHistory == other.incomeHistory && isActive == other.isActive && lastName == other.lastName && latestRehireDate == other.latestRehireDate && location == other.location && manager == other.manager && middleName == other.middleName && sourceId == other.sourceId && startDate == other.startDate && title == other.title && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(classCode, customFields, department, employment, endDate, firstName, income, incomeHistory, isActive, lastName, latestRehireDate, location, manager, middleName, sourceId, startDate, title, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(classCode, customFields, department, employment, endDate, firstName, income, incomeHistory, isActive, lastName, latestRehireDate, location, manager, middleName, sourceId, startDate, title, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxEmploymentUpdateBody{classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, endDate=$endDate, firstName=$firstName, income=$income, incomeHistory=$incomeHistory, isActive=$isActive, lastName=$lastName, latestRehireDate=$latestRehireDate, location=$location, manager=$manager, middleName=$middleName, sourceId=$sourceId, startDate=$startDate, title=$title, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxEmploymentUpdateParams && this.individualId == other.individualId && this.classCode == other.classCode && this.customFields == other.customFields && this.department == other.department && this.employment == other.employment && this.endDate == other.endDate && this.firstName == other.firstName && this.income == other.income && this.incomeHistory == other.incomeHistory && this.isActive == other.isActive && this.lastName == other.lastName && this.latestRehireDate == other.latestRehireDate && this.location == other.location && this.manager == other.manager && this.middleName == other.middleName && this.sourceId == other.sourceId && this.startDate == other.startDate && this.title == other.title && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualId, classCode, customFields, department, employment, endDate, firstName, income, incomeHistory, isActive, lastName, latestRehireDate, location, manager, middleName, sourceId, startDate, title, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxEmploymentUpdateParams{individualId=$individualId, classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, endDate=$endDate, firstName=$firstName, income=$income, incomeHistory=$incomeHistory, isActive=$isActive, lastName=$lastName, latestRehireDate=$latestRehireDate, location=$location, manager=$manager, middleName=$middleName, sourceId=$sourceId, startDate=$startDate, title=$title, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -436,27 +418,30 @@ constructor( @JvmSynthetic internal fun from(sandboxEmploymentUpdateParams: SandboxEmploymentUpdateParams) = apply { - this.individualId = sandboxEmploymentUpdateParams.individualId - this.classCode = sandboxEmploymentUpdateParams.classCode - this.customFields(sandboxEmploymentUpdateParams.customFields ?: listOf()) - this.department = sandboxEmploymentUpdateParams.department - this.employment = sandboxEmploymentUpdateParams.employment - this.endDate = sandboxEmploymentUpdateParams.endDate - this.firstName = sandboxEmploymentUpdateParams.firstName - this.income = sandboxEmploymentUpdateParams.income - this.incomeHistory(sandboxEmploymentUpdateParams.incomeHistory ?: listOf()) - this.isActive = sandboxEmploymentUpdateParams.isActive - this.lastName = sandboxEmploymentUpdateParams.lastName - this.latestRehireDate = sandboxEmploymentUpdateParams.latestRehireDate - this.location = sandboxEmploymentUpdateParams.location - this.manager = sandboxEmploymentUpdateParams.manager - this.middleName = sandboxEmploymentUpdateParams.middleName - this.sourceId = sandboxEmploymentUpdateParams.sourceId - this.startDate = sandboxEmploymentUpdateParams.startDate - this.title = sandboxEmploymentUpdateParams.title - additionalHeaders(sandboxEmploymentUpdateParams.additionalHeaders) - additionalQueryParams(sandboxEmploymentUpdateParams.additionalQueryParams) - additionalBodyProperties(sandboxEmploymentUpdateParams.additionalBodyProperties) + individualId = sandboxEmploymentUpdateParams.individualId + classCode = sandboxEmploymentUpdateParams.classCode + customFields = + sandboxEmploymentUpdateParams.customFields?.toMutableList() ?: mutableListOf() + department = sandboxEmploymentUpdateParams.department + employment = sandboxEmploymentUpdateParams.employment + endDate = sandboxEmploymentUpdateParams.endDate + firstName = sandboxEmploymentUpdateParams.firstName + income = sandboxEmploymentUpdateParams.income + incomeHistory = + sandboxEmploymentUpdateParams.incomeHistory?.toMutableList() ?: mutableListOf() + isActive = sandboxEmploymentUpdateParams.isActive + lastName = sandboxEmploymentUpdateParams.lastName + latestRehireDate = sandboxEmploymentUpdateParams.latestRehireDate + location = sandboxEmploymentUpdateParams.location + manager = sandboxEmploymentUpdateParams.manager + middleName = sandboxEmploymentUpdateParams.middleName + sourceId = sandboxEmploymentUpdateParams.sourceId + startDate = sandboxEmploymentUpdateParams.startDate + title = sandboxEmploymentUpdateParams.title + additionalHeaders = sandboxEmploymentUpdateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxEmploymentUpdateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxEmploymentUpdateParams.additionalBodyProperties.toMutableMap() } fun individualId(individualId: String) = apply { this.individualId = individualId } @@ -658,13 +643,13 @@ constructor( SandboxEmploymentUpdateParams( checkNotNull(individualId) { "`individualId` is required but was not set" }, classCode, - if (customFields.size == 0) null else customFields.toImmutable(), + customFields.toImmutable().ifEmpty { null }, department, employment, endDate, firstName, income, - if (incomeHistory.size == 0) null else incomeHistory.toImmutable(), + incomeHistory.toImmutable().ifEmpty { null }, isActive, lastName, latestRehireDate, @@ -748,17 +733,14 @@ constructor( return true } - return /* spotless:off */ other is CustomField && this.name == other.name && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is CustomField && name == other.name && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "CustomField{name=$name, value=$value, additionalProperties=$additionalProperties}" @@ -823,17 +805,14 @@ constructor( return true } - return /* spotless:off */ other is Department && this.name == other.name && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Department && name == other.name && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Department{name=$name, additionalProperties=$additionalProperties}" @@ -927,7 +906,7 @@ constructor( return true } - return /* spotless:off */ other is Subtype && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Subtype && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1008,7 +987,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1057,17 +1036,14 @@ constructor( return true } - return /* spotless:off */ other is Employment && this.type == other.type && this.subtype == other.subtype && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Employment && type == other.type && subtype == other.subtype && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, subtype, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, subtype, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Employment{type=$type, subtype=$subtype, additionalProperties=$additionalProperties}" @@ -1132,18 +1108,28 @@ constructor( return true } - return /* spotless:off */ other is Manager && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Manager && id == other.id && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Manager{id=$id, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxEmploymentUpdateParams && individualId == other.individualId && classCode == other.classCode && customFields == other.customFields && department == other.department && employment == other.employment && endDate == other.endDate && firstName == other.firstName && income == other.income && incomeHistory == other.incomeHistory && isActive == other.isActive && lastName == other.lastName && latestRehireDate == other.latestRehireDate && location == other.location && manager == other.manager && middleName == other.middleName && sourceId == other.sourceId && startDate == other.startDate && title == other.title && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualId, classCode, customFields, department, employment, endDate, firstName, income, incomeHistory, isActive, lastName, latestRehireDate, location, manager, middleName, sourceId, startDate, title, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxEmploymentUpdateParams{individualId=$individualId, classCode=$classCode, customFields=$customFields, department=$department, employment=$employment, endDate=$endDate, firstName=$firstName, income=$income, incomeHistory=$incomeHistory, isActive=$isActive, lastName=$lastName, latestRehireDate=$latestRehireDate, location=$location, manager=$manager, middleName=$middleName, sourceId=$sourceId, startDate=$startDate, title=$title, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt index cad75d76..b4c5774b 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxIndividualUpdateParams.kt @@ -66,6 +66,12 @@ constructor( fun ssn(): Optional = Optional.ofNullable(ssn) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxIndividualUpdateBody { return SandboxIndividualUpdateBody( @@ -286,43 +292,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxIndividualUpdateBody && this.dob == other.dob && this.emails == other.emails && this.encryptedSsn == other.encryptedSsn && this.ethnicity == other.ethnicity && this.firstName == other.firstName && this.gender == other.gender && this.lastName == other.lastName && this.middleName == other.middleName && this.phoneNumbers == other.phoneNumbers && this.preferredName == other.preferredName && this.residence == other.residence && this.ssn == other.ssn && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxIndividualUpdateBody && dob == other.dob && emails == other.emails && encryptedSsn == other.encryptedSsn && ethnicity == other.ethnicity && firstName == other.firstName && gender == other.gender && lastName == other.lastName && middleName == other.middleName && phoneNumbers == other.phoneNumbers && preferredName == other.preferredName && residence == other.residence && ssn == other.ssn && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(dob, emails, encryptedSsn, ethnicity, firstName, gender, lastName, middleName, phoneNumbers, preferredName, residence, ssn, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(dob, emails, encryptedSsn, ethnicity, firstName, gender, lastName, middleName, phoneNumbers, preferredName, residence, ssn, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxIndividualUpdateBody{dob=$dob, emails=$emails, encryptedSsn=$encryptedSsn, ethnicity=$ethnicity, firstName=$firstName, gender=$gender, lastName=$lastName, middleName=$middleName, phoneNumbers=$phoneNumbers, preferredName=$preferredName, residence=$residence, ssn=$ssn, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxIndividualUpdateParams && this.individualId == other.individualId && this.dob == other.dob && this.emails == other.emails && this.encryptedSsn == other.encryptedSsn && this.ethnicity == other.ethnicity && this.firstName == other.firstName && this.gender == other.gender && this.lastName == other.lastName && this.middleName == other.middleName && this.phoneNumbers == other.phoneNumbers && this.preferredName == other.preferredName && this.residence == other.residence && this.ssn == other.ssn && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(individualId, dob, emails, encryptedSsn, ethnicity, firstName, gender, lastName, middleName, phoneNumbers, preferredName, residence, ssn, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxIndividualUpdateParams{individualId=$individualId, dob=$dob, emails=$emails, encryptedSsn=$encryptedSsn, ethnicity=$ethnicity, firstName=$firstName, gender=$gender, lastName=$lastName, middleName=$middleName, phoneNumbers=$phoneNumbers, preferredName=$preferredName, residence=$residence, ssn=$ssn, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -352,22 +334,24 @@ constructor( @JvmSynthetic internal fun from(sandboxIndividualUpdateParams: SandboxIndividualUpdateParams) = apply { - this.individualId = sandboxIndividualUpdateParams.individualId - this.dob = sandboxIndividualUpdateParams.dob - this.emails(sandboxIndividualUpdateParams.emails ?: listOf()) - this.encryptedSsn = sandboxIndividualUpdateParams.encryptedSsn - this.ethnicity = sandboxIndividualUpdateParams.ethnicity - this.firstName = sandboxIndividualUpdateParams.firstName - this.gender = sandboxIndividualUpdateParams.gender - this.lastName = sandboxIndividualUpdateParams.lastName - this.middleName = sandboxIndividualUpdateParams.middleName - this.phoneNumbers(sandboxIndividualUpdateParams.phoneNumbers ?: listOf()) - this.preferredName = sandboxIndividualUpdateParams.preferredName - this.residence = sandboxIndividualUpdateParams.residence - this.ssn = sandboxIndividualUpdateParams.ssn - additionalHeaders(sandboxIndividualUpdateParams.additionalHeaders) - additionalQueryParams(sandboxIndividualUpdateParams.additionalQueryParams) - additionalBodyProperties(sandboxIndividualUpdateParams.additionalBodyProperties) + individualId = sandboxIndividualUpdateParams.individualId + dob = sandboxIndividualUpdateParams.dob + emails = sandboxIndividualUpdateParams.emails?.toMutableList() ?: mutableListOf() + encryptedSsn = sandboxIndividualUpdateParams.encryptedSsn + ethnicity = sandboxIndividualUpdateParams.ethnicity + firstName = sandboxIndividualUpdateParams.firstName + gender = sandboxIndividualUpdateParams.gender + lastName = sandboxIndividualUpdateParams.lastName + middleName = sandboxIndividualUpdateParams.middleName + phoneNumbers = + sandboxIndividualUpdateParams.phoneNumbers?.toMutableList() ?: mutableListOf() + preferredName = sandboxIndividualUpdateParams.preferredName + residence = sandboxIndividualUpdateParams.residence + ssn = sandboxIndividualUpdateParams.ssn + additionalHeaders = sandboxIndividualUpdateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxIndividualUpdateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxIndividualUpdateParams.additionalBodyProperties.toMutableMap() } fun individualId(individualId: String) = apply { this.individualId = individualId } @@ -546,14 +530,14 @@ constructor( SandboxIndividualUpdateParams( checkNotNull(individualId) { "`individualId` is required but was not set" }, dob, - if (emails.size == 0) null else emails.toImmutable(), + emails.toImmutable().ifEmpty { null }, encryptedSsn, ethnicity, firstName, gender, lastName, middleName, - if (phoneNumbers.size == 0) null else phoneNumbers.toImmutable(), + phoneNumbers.toImmutable().ifEmpty { null }, preferredName, residence, ssn, @@ -639,7 +623,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -688,17 +672,14 @@ constructor( return true } - return /* spotless:off */ other is Email && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Email && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Email{data=$data, type=$type, additionalProperties=$additionalProperties}" @@ -717,7 +698,7 @@ constructor( return true } - return /* spotless:off */ other is Ethnicity && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Ethnicity && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -815,7 +796,7 @@ constructor( return true } - return /* spotless:off */ other is Gender && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Gender && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -947,7 +928,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -996,19 +977,29 @@ constructor( return true } - return /* spotless:off */ other is PhoneNumber && this.data == other.data && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PhoneNumber && data == other.data && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(data, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(data, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PhoneNumber{data=$data, type=$type, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxIndividualUpdateParams && individualId == other.individualId && dob == other.dob && emails == other.emails && encryptedSsn == other.encryptedSsn && ethnicity == other.ethnicity && firstName == other.firstName && gender == other.gender && lastName == other.lastName && middleName == other.middleName && phoneNumbers == other.phoneNumbers && preferredName == other.preferredName && residence == other.residence && ssn == other.ssn && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(individualId, dob, emails, encryptedSsn, ethnicity, firstName, gender, lastName, middleName, phoneNumbers, preferredName, residence, ssn, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxIndividualUpdateParams{individualId=$individualId, dob=$dob, emails=$emails, encryptedSsn=$encryptedSsn, ethnicity=$ethnicity, firstName=$firstName, gender=$gender, lastName=$lastName, middleName=$middleName, phoneNumbers=$phoneNumbers, preferredName=$preferredName, residence=$residence, ssn=$ssn, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfiguration.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfiguration.kt index 6dc3dad8..40cfdba5 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfiguration.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfiguration.kt @@ -118,7 +118,7 @@ private constructor( return true } - return /* spotless:off */ other is CompletionStatus && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is CompletionStatus && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -187,7 +187,7 @@ private constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -230,17 +230,14 @@ private constructor( return true } - return /* spotless:off */ other is SandboxJobConfiguration && this.type == other.type && this.completionStatus == other.completionStatus && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxJobConfiguration && type == other.type && completionStatus == other.completionStatus && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, completionStatus, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, completionStatus, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxJobConfiguration{type=$type, completionStatus=$completionStatus, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt index 037dc137..9b1dd705 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationRetrieveParams.kt @@ -14,28 +14,13 @@ constructor( private val additionalQueryParams: QueryParams, ) { - @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - - @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams - fun _additionalHeaders(): Headers = additionalHeaders fun _additionalQueryParams(): QueryParams = additionalQueryParams - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxJobConfigurationRetrieveParams && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ - } + @JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders - override fun toString() = - "SandboxJobConfigurationRetrieveParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" + @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams fun toBuilder() = Builder().from(this) @@ -54,8 +39,9 @@ constructor( internal fun from( sandboxJobConfigurationRetrieveParams: SandboxJobConfigurationRetrieveParams ) = apply { - additionalHeaders(sandboxJobConfigurationRetrieveParams.additionalHeaders) - additionalQueryParams(sandboxJobConfigurationRetrieveParams.additionalQueryParams) + additionalHeaders = sandboxJobConfigurationRetrieveParams.additionalHeaders.toBuilder() + additionalQueryParams = + sandboxJobConfigurationRetrieveParams.additionalQueryParams.toBuilder() } fun additionalHeaders(additionalHeaders: Headers) = apply { @@ -162,4 +148,17 @@ constructor( additionalQueryParams.build() ) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxJobConfigurationRetrieveParams && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalHeaders, additionalQueryParams) /* spotless:on */ + + override fun toString() = + "SandboxJobConfigurationRetrieveParams{additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt index 9df15165..17b433ed 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobConfigurationUpdateParams.kt @@ -32,6 +32,12 @@ constructor( fun type(): Type = type + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxJobConfigurationUpdateBody { return SandboxJobConfigurationUpdateBody( @@ -121,43 +127,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxJobConfigurationUpdateBody && this.completionStatus == other.completionStatus && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxJobConfigurationUpdateBody && completionStatus == other.completionStatus && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(completionStatus, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(completionStatus, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxJobConfigurationUpdateBody{completionStatus=$completionStatus, type=$type, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxJobConfigurationUpdateParams && this.completionStatus == other.completionStatus && this.type == other.type && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(completionStatus, type, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxJobConfigurationUpdateParams{completionStatus=$completionStatus, type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -178,11 +160,13 @@ constructor( internal fun from( sandboxJobConfigurationUpdateParams: SandboxJobConfigurationUpdateParams ) = apply { - this.completionStatus = sandboxJobConfigurationUpdateParams.completionStatus - this.type = sandboxJobConfigurationUpdateParams.type - additionalHeaders(sandboxJobConfigurationUpdateParams.additionalHeaders) - additionalQueryParams(sandboxJobConfigurationUpdateParams.additionalQueryParams) - additionalBodyProperties(sandboxJobConfigurationUpdateParams.additionalBodyProperties) + completionStatus = sandboxJobConfigurationUpdateParams.completionStatus + type = sandboxJobConfigurationUpdateParams.type + additionalHeaders = sandboxJobConfigurationUpdateParams.additionalHeaders.toBuilder() + additionalQueryParams = + sandboxJobConfigurationUpdateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxJobConfigurationUpdateParams.additionalBodyProperties.toMutableMap() } fun completionStatus(completionStatus: CompletionStatus) = apply { @@ -334,7 +318,7 @@ constructor( return true } - return /* spotless:off */ other is CompletionStatus && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is CompletionStatus && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -403,7 +387,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -440,4 +424,17 @@ constructor( fun asString(): String = _value().asStringOrThrow() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxJobConfigurationUpdateParams && completionStatus == other.completionStatus && type == other.type && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(completionStatus, type, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxJobConfigurationUpdateParams{completionStatus=$completionStatus, type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt index c6dbf8f7..f3842a65 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxJobCreateParams.kt @@ -29,6 +29,12 @@ constructor( fun type(): Type = type + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxJobCreateBody { return SandboxJobCreateBody(type, additionalBodyProperties) @@ -100,43 +106,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxJobCreateBody && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxJobCreateBody && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxJobCreateBody{type=$type, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxJobCreateParams && this.type == other.type && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(type, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxJobCreateParams{type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -154,10 +136,11 @@ constructor( @JvmSynthetic internal fun from(sandboxJobCreateParams: SandboxJobCreateParams) = apply { - this.type = sandboxJobCreateParams.type - additionalHeaders(sandboxJobCreateParams.additionalHeaders) - additionalQueryParams(sandboxJobCreateParams.additionalQueryParams) - additionalBodyProperties(sandboxJobCreateParams.additionalBodyProperties) + type = sandboxJobCreateParams.type + additionalHeaders = sandboxJobCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxJobCreateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxJobCreateParams.additionalBodyProperties.toMutableMap() } /** The type of job to start. Currently the only supported type is `data_sync_all` */ @@ -305,7 +288,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -342,4 +325,17 @@ constructor( fun asString(): String = _value().asStringOrThrow() } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxJobCreateParams && type == other.type && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(type, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxJobCreateParams{type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt index 2af4a8d7..a105dc4c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParams.kt @@ -36,6 +36,12 @@ constructor( fun startDate(): Optional = Optional.ofNullable(startDate) + fun _additionalHeaders(): Headers = additionalHeaders + + fun _additionalQueryParams(): QueryParams = additionalQueryParams + + fun _additionalBodyProperties(): Map = additionalBodyProperties + @JvmSynthetic internal fun getBody(): SandboxPaymentCreateBody { return SandboxPaymentCreateBody( @@ -135,43 +141,19 @@ constructor( return true } - return /* spotless:off */ other is SandboxPaymentCreateBody && this.endDate == other.endDate && this.payStatements == other.payStatements && this.startDate == other.startDate && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SandboxPaymentCreateBody && endDate == other.endDate && payStatements == other.payStatements && startDate == other.startDate && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(endDate, payStatements, startDate, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(endDate, payStatements, startDate, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SandboxPaymentCreateBody{endDate=$endDate, payStatements=$payStatements, startDate=$startDate, additionalProperties=$additionalProperties}" } - fun _additionalHeaders(): Headers = additionalHeaders - - fun _additionalQueryParams(): QueryParams = additionalQueryParams - - fun _additionalBodyProperties(): Map = additionalBodyProperties - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return /* spotless:off */ other is SandboxPaymentCreateParams && this.endDate == other.endDate && this.payStatements == other.payStatements && this.startDate == other.startDate && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(endDate, payStatements, startDate, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } - - override fun toString() = - "SandboxPaymentCreateParams{endDate=$endDate, payStatements=$payStatements, startDate=$startDate, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -191,12 +173,14 @@ constructor( @JvmSynthetic internal fun from(sandboxPaymentCreateParams: SandboxPaymentCreateParams) = apply { - this.endDate = sandboxPaymentCreateParams.endDate - this.payStatements(sandboxPaymentCreateParams.payStatements ?: listOf()) - this.startDate = sandboxPaymentCreateParams.startDate - additionalHeaders(sandboxPaymentCreateParams.additionalHeaders) - additionalQueryParams(sandboxPaymentCreateParams.additionalQueryParams) - additionalBodyProperties(sandboxPaymentCreateParams.additionalBodyProperties) + endDate = sandboxPaymentCreateParams.endDate + payStatements = + sandboxPaymentCreateParams.payStatements?.toMutableList() ?: mutableListOf() + startDate = sandboxPaymentCreateParams.startDate + additionalHeaders = sandboxPaymentCreateParams.additionalHeaders.toBuilder() + additionalQueryParams = sandboxPaymentCreateParams.additionalQueryParams.toBuilder() + additionalBodyProperties = + sandboxPaymentCreateParams.additionalBodyProperties.toMutableMap() } fun endDate(endDate: String) = apply { this.endDate = endDate } @@ -335,7 +319,7 @@ constructor( fun build(): SandboxPaymentCreateParams = SandboxPaymentCreateParams( endDate, - if (payStatements.size == 0) null else payStatements.toImmutable(), + payStatements.toImmutable().ifEmpty { null }, startDate, additionalHeaders.build(), additionalQueryParams.build(), @@ -617,7 +601,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -732,17 +716,14 @@ constructor( return true } - return /* spotless:off */ other is Earning && this.type == other.type && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.hours == other.hours && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Earning && type == other.type && name == other.name && amount == other.amount && currency == other.currency && hours == other.hours && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, amount, currency, hours, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, amount, currency, hours, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Earning{type=$type, name=$name, amount=$amount, currency=$currency, hours=$hours, additionalProperties=$additionalProperties}" @@ -853,17 +834,14 @@ constructor( return true } - return /* spotless:off */ other is EmployeeDeduction && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.preTax == other.preTax && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployeeDeduction && name == other.name && amount == other.amount && currency == other.currency && preTax == other.preTax && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, currency, preTax, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, currency, preTax, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployeeDeduction{name=$name, amount=$amount, currency=$currency, preTax=$preTax, type=$type, additionalProperties=$additionalProperties}" @@ -963,17 +941,14 @@ constructor( return true } - return /* spotless:off */ other is EmployerContribution && this.name == other.name && this.amount == other.amount && this.currency == other.currency && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is EmployerContribution && name == other.name && amount == other.amount && currency == other.currency && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, amount, currency, type, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, amount, currency, type, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "EmployerContribution{name=$name, amount=$amount, currency=$currency, type=$type, additionalProperties=$additionalProperties}" @@ -992,7 +967,7 @@ constructor( return true } - return /* spotless:off */ other is PaymentMethod && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is PaymentMethod && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1149,7 +1124,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1210,17 +1185,14 @@ constructor( return true } - return /* spotless:off */ other is Tax && this.type == other.type && this.name == other.name && this.employer == other.employer && this.amount == other.amount && this.currency == other.currency && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Tax && type == other.type && name == other.name && employer == other.employer && amount == other.amount && currency == other.currency && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, name, employer, amount, currency, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, name, employer, amount, currency, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Tax{type=$type, name=$name, employer=$employer, amount=$amount, currency=$currency, additionalProperties=$additionalProperties}" @@ -1239,7 +1211,7 @@ constructor( return true } - return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Type && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -1294,19 +1266,29 @@ constructor( return true } - return /* spotless:off */ other is PayStatement && this.individualId == other.individualId && this.type == other.type && this.paymentMethod == other.paymentMethod && this.totalHours == other.totalHours && this.grossPay == other.grossPay && this.netPay == other.netPay && this.earnings == other.earnings && this.taxes == other.taxes && this.employeeDeductions == other.employeeDeductions && this.employerContributions == other.employerContributions && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is PayStatement && individualId == other.individualId && type == other.type && paymentMethod == other.paymentMethod && totalHours == other.totalHours && grossPay == other.grossPay && netPay == other.netPay && earnings == other.earnings && taxes == other.taxes && employeeDeductions == other.employeeDeductions && employerContributions == other.employerContributions && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, taxes, employeeDeductions, employerContributions, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, type, paymentMethod, totalHours, grossPay, netPay, earnings, taxes, employeeDeductions, employerContributions, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "PayStatement{individualId=$individualId, type=$type, paymentMethod=$paymentMethod, totalHours=$totalHours, grossPay=$grossPay, netPay=$netPay, earnings=$earnings, taxes=$taxes, employeeDeductions=$employeeDeductions, employerContributions=$employerContributions, additionalProperties=$additionalProperties}" } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is SandboxPaymentCreateParams && endDate == other.endDate && payStatements == other.payStatements && startDate == other.startDate && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(endDate, payStatements, startDate, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ + + override fun toString() = + "SandboxPaymentCreateParams{endDate=$endDate, payStatements=$payStatements, startDate=$startDate, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionNewResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionNewResponse.kt index b9b45e37..861f7dbc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionNewResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionNewResponse.kt @@ -112,17 +112,14 @@ private constructor( return true } - return /* spotless:off */ other is SessionNewResponse && this.sessionId == other.sessionId && this.connectUrl == other.connectUrl && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SessionNewResponse && sessionId == other.sessionId && connectUrl == other.connectUrl && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(sessionId, connectUrl, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(sessionId, connectUrl, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SessionNewResponse{sessionId=$sessionId, connectUrl=$connectUrl, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionReauthenticateResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionReauthenticateResponse.kt index 579c1fa7..b6d8d15e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionReauthenticateResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SessionReauthenticateResponse.kt @@ -112,17 +112,14 @@ private constructor( return true } - return /* spotless:off */ other is SessionReauthenticateResponse && this.sessionId == other.sessionId && this.connectUrl == other.connectUrl && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SessionReauthenticateResponse && sessionId == other.sessionId && connectUrl == other.connectUrl && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(sessionId, connectUrl, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(sessionId, connectUrl, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SessionReauthenticateResponse{sessionId=$sessionId, connectUrl=$connectUrl, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportPerBenefitType.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportPerBenefitType.kt index 72b0dbf4..9cdada36 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportPerBenefitType.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportPerBenefitType.kt @@ -115,17 +115,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportPerBenefitType && this.companyBenefits == other.companyBenefits && this.individualBenefits == other.individualBenefits && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportPerBenefitType && companyBenefits == other.companyBenefits && individualBenefits == other.individualBenefits && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(companyBenefits, individualBenefits, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(companyBenefits, individualBenefits, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportPerBenefitType{companyBenefits=$companyBenefits, individualBenefits=$individualBenefits, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt index 7a89ae58..e1878699 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/SupportedBenefit.kt @@ -288,7 +288,7 @@ private constructor( return true } - return /* spotless:off */ other is CompanyContribution && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is CompanyContribution && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -345,7 +345,7 @@ private constructor( return true } - return /* spotless:off */ other is EmployeeDeduction && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is EmployeeDeduction && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -402,7 +402,7 @@ private constructor( return true } - return /* spotless:off */ other is HsaContributionLimit && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is HsaContributionLimit && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -451,17 +451,14 @@ private constructor( return true } - return /* spotless:off */ other is SupportedBenefit && this.type == other.type && this.description == other.description && this.frequencies == other.frequencies && this.employeeDeduction == other.employeeDeduction && this.companyContribution == other.companyContribution && this.annualMaximum == other.annualMaximum && this.catchUp == other.catchUp && this.hsaContributionLimit == other.hsaContributionLimit && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is SupportedBenefit && type == other.type && description == other.description && frequencies == other.frequencies && employeeDeduction == other.employeeDeduction && companyContribution == other.companyContribution && annualMaximum == other.annualMaximum && catchUp == other.catchUp && hsaContributionLimit == other.hsaContributionLimit && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, description, frequencies, employeeDeduction, companyContribution, annualMaximum, catchUp, hsaContributionLimit, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, description, frequencies, employeeDeduction, companyContribution, annualMaximum, catchUp, hsaContributionLimit, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "SupportedBenefit{type=$type, description=$description, frequencies=$frequencies, employeeDeduction=$employeeDeduction, companyContribution=$companyContribution, annualMaximum=$annualMaximum, catchUp=$catchUp, hsaContributionLimit=$hsaContributionLimit, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UnenrolledIndividual.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UnenrolledIndividual.kt index e9ede5fd..31cd41c2 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UnenrolledIndividual.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UnenrolledIndividual.kt @@ -239,17 +239,14 @@ private constructor( return true } - return /* spotless:off */ other is Body && this.name == other.name && this.finchCode == other.finchCode && this.message == other.message && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Body && name == other.name && finchCode == other.finchCode && message == other.message && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(name, finchCode, message, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(name, finchCode, message, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Body{name=$name, finchCode=$finchCode, message=$message, additionalProperties=$additionalProperties}" @@ -260,17 +257,14 @@ private constructor( return true } - return /* spotless:off */ other is UnenrolledIndividual && this.individualId == other.individualId && this.code == other.code && this.body == other.body && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is UnenrolledIndividual && individualId == other.individualId && code == other.code && body == other.body && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(individualId, code, body, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(individualId, code, body, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "UnenrolledIndividual{individualId=$individualId, code=$code, body=$body, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UpdateCompanyBenefitResponse.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UpdateCompanyBenefitResponse.kt index d0b131d7..e28516c4 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UpdateCompanyBenefitResponse.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/UpdateCompanyBenefitResponse.kt @@ -86,17 +86,14 @@ private constructor( return true } - return /* spotless:off */ other is UpdateCompanyBenefitResponse && this.benefitId == other.benefitId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is UpdateCompanyBenefitResponse && benefitId == other.benefitId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(benefitId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(benefitId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "UpdateCompanyBenefitResponse{benefitId=$benefitId, additionalProperties=$additionalProperties}" diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/WebhookEvent.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/WebhookEvent.kt index 4704ad35..82ad6b1c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/models/WebhookEvent.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/models/WebhookEvent.kt @@ -123,15 +123,13 @@ private constructor( return true } - return /* spotless:off */ other is WebhookEvent && this.accountUpdateEvent == other.accountUpdateEvent && this.jobCompletionEvent == other.jobCompletionEvent && this.companyEvent == other.companyEvent && this.directoryEvent == other.directoryEvent && this.employmentEvent == other.employmentEvent && this.individualEvent == other.individualEvent && this.paymentEvent == other.paymentEvent && this.payStatementEvent == other.payStatementEvent /* spotless:on */ + return /* spotless:off */ other is WebhookEvent && accountUpdateEvent == other.accountUpdateEvent && jobCompletionEvent == other.jobCompletionEvent && companyEvent == other.companyEvent && directoryEvent == other.directoryEvent && employmentEvent == other.employmentEvent && individualEvent == other.individualEvent && paymentEvent == other.paymentEvent && payStatementEvent == other.payStatementEvent /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(accountUpdateEvent, jobCompletionEvent, companyEvent, directoryEvent, employmentEvent, individualEvent, paymentEvent, payStatementEvent) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(accountUpdateEvent, jobCompletionEvent, companyEvent, directoryEvent, employmentEvent, individualEvent, paymentEvent, payStatementEvent) /* spotless:on */ - override fun toString(): String { - return when { + override fun toString(): String = + when { accountUpdateEvent != null -> "WebhookEvent{accountUpdateEvent=$accountUpdateEvent}" jobCompletionEvent != null -> "WebhookEvent{jobCompletionEvent=$jobCompletionEvent}" companyEvent != null -> "WebhookEvent{companyEvent=$companyEvent}" @@ -143,7 +141,6 @@ private constructor( _json != null -> "WebhookEvent{_unknown=$_json}" else -> throw IllegalStateException("Invalid WebhookEvent") } - } companion object { diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsync.kt index e2861762..922adb3f 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsync.kt @@ -2,17 +2,12 @@ package com.tryfinch.api.services.async - import com.tryfinch.api.core.http.Headers import com.tryfinch.api.models.WebhookEvent interface WebhookServiceAsync { - fun unwrap( - payload: String, - headers: Headers, - secret: String? - ): WebhookEvent + fun unwrap(payload: String, headers: Headers, secret: String?): WebhookEvent fun verifySignature(payload: String, headers: Headers, secret: String?) } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsyncImpl.kt index 031eef07..f47b6f97 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/WebhookServiceAsyncImpl.kt @@ -3,7 +3,6 @@ package com.tryfinch.api.services.async import com.fasterxml.jackson.core.JsonProcessingException - import com.tryfinch.api.core.ClientOptions import com.tryfinch.api.core.getRequiredHeader import com.tryfinch.api.core.handlers.errorHandler @@ -26,11 +25,7 @@ constructor( private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) - override fun unwrap( - payload: String, - headers: Headers, - secret: String? - ): WebhookEvent { + override fun unwrap(payload: String, headers: Headers, secret: String?): WebhookEvent { verifySignature(payload, headers, secret) return try { clientOptions.jsonMapper.readValue(payload, WebhookEvent::class.java) @@ -39,11 +34,7 @@ constructor( } } - override fun verifySignature( - payload: String, - headers: Headers, - secret: String? - ) { + override fun verifySignature(payload: String, headers: Headers, secret: String?) { val webhookSecret = secret ?: clientOptions.webhookSecret diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt index 2d17c387..4489016e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsync.kt @@ -24,8 +24,8 @@ interface AutomatedServiceAsync { * of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced * refresh per hour per connection. * - * `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by - * `individual_id`. This feature is currently in beta. + * `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual, + * identified by `individual_id`. This feature is currently in beta. * * This endpoint is available for _Scale_ tier customers as an add-on. To request access to this * endpoint, please contact your Finch account manager. diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt index 9ca36511..c32fa74c 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/async/jobs/AutomatedServiceAsyncImpl.kt @@ -40,8 +40,8 @@ constructor( * of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced * refresh per hour per connection. * - * `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by - * `individual_id`. This feature is currently in beta. + * `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual, + * identified by `individual_id`. This feature is currently in beta. * * This endpoint is available for _Scale_ tier customers as an add-on. To request access to this * endpoint, please contact your Finch account manager. diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookService.kt index c508ee6a..a4236a2e 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookService.kt @@ -2,17 +2,12 @@ package com.tryfinch.api.services.blocking - import com.tryfinch.api.core.http.Headers import com.tryfinch.api.models.WebhookEvent interface WebhookService { - fun unwrap( - payload: String, - headers: Headers, - secret: String? - ): WebhookEvent + fun unwrap(payload: String, headers: Headers, secret: String?): WebhookEvent fun verifySignature(payload: String, headers: Headers, secret: String?) } diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookServiceImpl.kt index 61a86d4a..0f688adc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/WebhookServiceImpl.kt @@ -3,7 +3,6 @@ package com.tryfinch.api.services.blocking import com.fasterxml.jackson.core.JsonProcessingException - import com.tryfinch.api.core.ClientOptions import com.tryfinch.api.core.getRequiredHeader import com.tryfinch.api.core.handlers.errorHandler @@ -26,11 +25,7 @@ constructor( private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper) - override fun unwrap( - payload: String, - headers: Headers, - secret: String? - ): WebhookEvent { + override fun unwrap(payload: String, headers: Headers, secret: String?): WebhookEvent { verifySignature(payload, headers, secret) return try { clientOptions.jsonMapper.readValue(payload, WebhookEvent::class.java) @@ -39,11 +34,7 @@ constructor( } } - override fun verifySignature( - payload: String, - headers: Headers, - secret: String? - ) { + override fun verifySignature(payload: String, headers: Headers, secret: String?) { val webhookSecret = secret ?: clientOptions.webhookSecret diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt index 94ffd4a2..8f5dd094 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedService.kt @@ -23,8 +23,8 @@ interface AutomatedService { * of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced * refresh per hour per connection. * - * `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by - * `individual_id`. This feature is currently in beta. + * `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual, + * identified by `individual_id`. This feature is currently in beta. * * This endpoint is available for _Scale_ tier customers as an add-on. To request access to this * endpoint, please contact your Finch account manager. diff --git a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt index d1e8fa11..0fd1aecc 100644 --- a/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt +++ b/finch-java-core/src/main/kotlin/com/tryfinch/api/services/blocking/jobs/AutomatedServiceImpl.kt @@ -39,8 +39,8 @@ constructor( * of the job that is currently in progress. Finch allows a fixed window rate limit of 1 forced * refresh per hour per connection. * - * `w4_data_sync`: Enqueues a job for sync W-4 data for a particular individual, identified by - * `individual_id`. This feature is currently in beta. + * `w4_form_employee_sync`: Enqueues a job for sync W-4 data for a particular individual, + * identified by `individual_id`. This feature is currently in beta. * * This endpoint is available for _Scale_ tier customers as an add-on. To request access to this * endpoint, please contact your Finch account manager. diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientAsyncTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientAsyncTest.kt index f081515c..e71b5843 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientAsyncTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientAsyncTest.kt @@ -8,7 +8,6 @@ import com.github.tomakehurst.wiremock.junit5.WireMockTest import com.tryfinch.api.client.okhttp.FinchOkHttpClientAsync import com.tryfinch.api.models.* import org.assertj.core.api.Assertions.assertThat -import org.assertj.guava.api.Assertions.assertThat import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientTest.kt index a91048b8..1d43e67f 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/client/FinchClientTest.kt @@ -8,7 +8,6 @@ import com.github.tomakehurst.wiremock.junit5.WireMockTest import com.tryfinch.api.client.okhttp.FinchOkHttpClient import com.tryfinch.api.models.* import org.assertj.core.api.Assertions.assertThat -import org.assertj.guava.api.Assertions.assertThat import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt index b7b37836..9fad95d7 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/AutomatedCreateResponseTest.kt @@ -11,16 +11,16 @@ class AutomatedCreateResponseTest { fun createAutomatedCreateResponse() { val automatedCreateResponse = AutomatedCreateResponse.builder() - .allowedRefreshes(123L) + .allowedRefreshes(0L) .jobId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .jobUrl("job_url") - .remainingRefreshes(123L) + .remainingRefreshes(0L) .build() assertThat(automatedCreateResponse).isNotNull - assertThat(automatedCreateResponse.allowedRefreshes()).isEqualTo(123L) + assertThat(automatedCreateResponse.allowedRefreshes()).isEqualTo(0L) assertThat(automatedCreateResponse.jobId()) .isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(automatedCreateResponse.jobUrl()).isEqualTo("job_url") - assertThat(automatedCreateResponse.remainingRefreshes()).isEqualTo(123L) + assertThat(automatedCreateResponse.remainingRefreshes()).isEqualTo(0L) } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitContributionTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitContributionTest.kt index f03a3aab..08448c53 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitContributionTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/BenefitContributionTest.kt @@ -10,9 +10,9 @@ class BenefitContributionTest { @Test fun createBenefitContribution() { val benefitContribution = - BenefitContribution.builder().amount(123L).type(BenefitContribution.Type.FIXED).build() + BenefitContribution.builder().amount(0L).type(BenefitContribution.Type.FIXED).build() assertThat(benefitContribution).isNotNull - assertThat(benefitContribution.amount()).contains(123L) + assertThat(benefitContribution.amount()).contains(0L) assertThat(benefitContribution.type()).contains(BenefitContribution.Type.FIXED) } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionNewParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionNewParamsTest.kt index d653c279..551c64df 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionNewParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionNewParamsTest.kt @@ -22,7 +22,7 @@ class ConnectSessionNewParamsTest { .build() ) .manual(true) - .minutesToExpire(42.23) + .minutesToExpire(1.0) .redirectUri("redirect_uri") .sandbox(ConnectSessionNewParams.Sandbox.FINCH) .build() @@ -43,7 +43,7 @@ class ConnectSessionNewParamsTest { .build() ) .manual(true) - .minutesToExpire(42.23) + .minutesToExpire(1.0) .redirectUri("redirect_uri") .sandbox(ConnectSessionNewParams.Sandbox.FINCH) .build() @@ -62,7 +62,7 @@ class ConnectSessionNewParamsTest { .build() ) assertThat(body.manual()).isEqualTo(true) - assertThat(body.minutesToExpire()).isEqualTo(42.23) + assertThat(body.minutesToExpire()).isEqualTo(1.0) assertThat(body.redirectUri()).isEqualTo("redirect_uri") assertThat(body.sandbox()).isEqualTo(ConnectSessionNewParams.Sandbox.FINCH) } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParamsTest.kt index 94b1af9b..1f04736a 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/ConnectSessionReauthenticateParamsTest.kt @@ -12,7 +12,7 @@ class ConnectSessionReauthenticateParamsTest { fun createConnectSessionReauthenticateParams() { ConnectSessionReauthenticateParams.builder() .connectionId("connection_id") - .minutesToExpire(123L) + .minutesToExpire(0L) .products(listOf(ConnectSessionReauthenticateParams.ConnectProducts.COMPANY)) .redirectUri("https://example.com") .build() @@ -23,14 +23,14 @@ class ConnectSessionReauthenticateParamsTest { val params = ConnectSessionReauthenticateParams.builder() .connectionId("connection_id") - .minutesToExpire(123L) + .minutesToExpire(0L) .products(listOf(ConnectSessionReauthenticateParams.ConnectProducts.COMPANY)) .redirectUri("https://example.com") .build() val body = params.getBody() assertThat(body).isNotNull assertThat(body.connectionId()).isEqualTo("connection_id") - assertThat(body.minutesToExpire()).isEqualTo(123L) + assertThat(body.minutesToExpire()).isEqualTo(0L) assertThat(body.products()) .isEqualTo(listOf(ConnectSessionReauthenticateParams.ConnectProducts.COMPANY)) assertThat(body.redirectUri()).isEqualTo("https://example.com") diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt index bafd4cfa..b6970cb2 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataResponseTest.kt @@ -35,7 +35,7 @@ class EmploymentDataResponseTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -44,7 +44,7 @@ class EmploymentDataResponseTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -74,7 +74,7 @@ class EmploymentDataResponseTest { .workId("work_id") .build() ) - .code(123L) + .code(0L) .individualId("individual_id") .build() assertThat(employmentDataResponse).isNotNull @@ -102,7 +102,7 @@ class EmploymentDataResponseTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -111,7 +111,7 @@ class EmploymentDataResponseTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -141,7 +141,7 @@ class EmploymentDataResponseTest { .workId("work_id") .build() ) - assertThat(employmentDataResponse.code()).contains(123L) + assertThat(employmentDataResponse.code()).contains(0L) assertThat(employmentDataResponse.individualId()).contains("individual_id") } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt index b4b3ada2..7df0aa35 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentDataTest.kt @@ -33,7 +33,7 @@ class EmploymentDataTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -42,7 +42,7 @@ class EmploymentDataTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -95,7 +95,7 @@ class EmploymentDataTest { assertThat(employmentData.income()) .contains( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -104,7 +104,7 @@ class EmploymentDataTest { assertThat(employmentData.incomeHistory().get()) .containsExactly( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentUpdateResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentUpdateResponseTest.kt index e70285a0..dc8e1154 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentUpdateResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/EmploymentUpdateResponseTest.kt @@ -33,7 +33,7 @@ class EmploymentUpdateResponseTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -42,7 +42,7 @@ class EmploymentUpdateResponseTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -94,7 +94,7 @@ class EmploymentUpdateResponseTest { assertThat(employmentUpdateResponse.income()) .contains( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -103,7 +103,7 @@ class EmploymentUpdateResponseTest { assertThat(employmentUpdateResponse.incomeHistory().get()) .containsExactly( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParamsTest.kt index b086e2a3..61b10594 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListIndividualsParamsTest.kt @@ -11,15 +11,15 @@ class HrisDirectoryListIndividualsParamsTest { @Test fun createHrisDirectoryListIndividualsParams() { - HrisDirectoryListIndividualsParams.builder().limit(123L).offset(123L).build() + HrisDirectoryListIndividualsParams.builder().limit(0L).offset(0L).build() } @Test fun getQueryParams() { - val params = HrisDirectoryListIndividualsParams.builder().limit(123L).offset(123L).build() + val params = HrisDirectoryListIndividualsParams.builder().limit(0L).offset(0L).build() val expected = QueryParams.builder() - expected.put("limit", "123") - expected.put("offset", "123") + expected.put("limit", "0") + expected.put("offset", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListParamsTest.kt index 7704fdc5..bbc93aad 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisDirectoryListParamsTest.kt @@ -11,15 +11,15 @@ class HrisDirectoryListParamsTest { @Test fun createHrisDirectoryListParams() { - HrisDirectoryListParams.builder().limit(123L).offset(123L).build() + HrisDirectoryListParams.builder().limit(0L).offset(0L).build() } @Test fun getQueryParams() { - val params = HrisDirectoryListParams.builder().limit(123L).offset(123L).build() + val params = HrisDirectoryListParams.builder().limit(0L).offset(0L).build() val expected = QueryParams.builder() - expected.put("limit", "123") - expected.put("offset", "123") + expected.put("limit", "0") + expected.put("offset", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParamsTest.kt index c5543d63..5377d2a2 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/HrisPayStatementRetrieveManyParamsTest.kt @@ -15,8 +15,8 @@ class HrisPayStatementRetrieveManyParamsTest { listOf( HrisPayStatementRetrieveManyParams.Request.builder() .paymentId("payment_id") - .limit(123L) - .offset(123L) + .limit(0L) + .offset(0L) .build() ) ) @@ -31,8 +31,8 @@ class HrisPayStatementRetrieveManyParamsTest { listOf( HrisPayStatementRetrieveManyParams.Request.builder() .paymentId("payment_id") - .limit(123L) - .offset(123L) + .limit(0L) + .offset(0L) .build() ) ) @@ -44,8 +44,8 @@ class HrisPayStatementRetrieveManyParamsTest { listOf( HrisPayStatementRetrieveManyParams.Request.builder() .paymentId("payment_id") - .limit(123L) - .offset(123L) + .limit(0L) + .offset(0L) .build() ) ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IncomeTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IncomeTest.kt index f66e6c9d..48189257 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IncomeTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IncomeTest.kt @@ -11,13 +11,13 @@ class IncomeTest { fun createIncome() { val income = Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) .build() assertThat(income).isNotNull - assertThat(income.amount()).contains(123L) + assertThat(income.amount()).contains(0L) assertThat(income.currency()).contains("currency") assertThat(income.effectiveDate()).contains("effective_date") assertThat(income.unit()).contains(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt index 20428e01..64fda15d 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualBenefitTest.kt @@ -13,17 +13,17 @@ class IndividualBenefitTest { IndividualBenefit.builder() .body( IndividualBenefit.Body.builder() - .annualMaximum(123L) + .annualMaximum(0L) .catchUp(true) .companyContribution( BenefitContribution.builder() - .amount(123L) + .amount(0L) .type(BenefitContribution.Type.FIXED) .build() ) .employeeDeduction( BenefitContribution.builder() - .amount(123L) + .amount(0L) .type(BenefitContribution.Type.FIXED) .build() ) @@ -32,31 +32,31 @@ class IndividualBenefitTest { ) .build() ) - .code(123L) + .code(0L) .individualId("individual_id") .build() assertThat(individualBenefit).isNotNull assertThat(individualBenefit.body()) .contains( IndividualBenefit.Body.builder() - .annualMaximum(123L) + .annualMaximum(0L) .catchUp(true) .companyContribution( BenefitContribution.builder() - .amount(123L) + .amount(0L) .type(BenefitContribution.Type.FIXED) .build() ) .employeeDeduction( BenefitContribution.builder() - .amount(123L) + .amount(0L) .type(BenefitContribution.Type.FIXED) .build() ) .hsaContributionLimit(IndividualBenefit.Body.HsaContributionLimit.INDIVIDUAL) .build() ) - assertThat(individualBenefit.code()).contains(123L) + assertThat(individualBenefit.code()).contains(0L) assertThat(individualBenefit.individualId()).contains("individual_id") } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualResponseTest.kt index cba15eb3..e8514a24 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/IndividualResponseTest.kt @@ -53,7 +53,7 @@ class IndividualResponseTest { .ssn("ssn") .build() ) - .code(123L) + .code(0L) .individualId("individual_id") .build() assertThat(individualResponse).isNotNull @@ -100,7 +100,7 @@ class IndividualResponseTest { .ssn("ssn") .build() ) - assertThat(individualResponse.code()).contains(123L) + assertThat(individualResponse.code()).contains(0L) assertThat(individualResponse.individualId()).contains("individual_id") } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobAutomatedListParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobAutomatedListParamsTest.kt index 871de3d4..5d49c993 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobAutomatedListParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobAutomatedListParamsTest.kt @@ -11,15 +11,15 @@ class JobAutomatedListParamsTest { @Test fun createJobAutomatedListParams() { - JobAutomatedListParams.builder().limit(123L).offset(123L).build() + JobAutomatedListParams.builder().limit(0L).offset(0L).build() } @Test fun getQueryParams() { - val params = JobAutomatedListParams.builder().limit(123L).offset(123L).build() + val params = JobAutomatedListParams.builder().limit(0L).offset(0L).build() val expected = QueryParams.builder() - expected.put("limit", "123") - expected.put("offset", "123") + expected.put("limit", "0") + expected.put("offset", "0") assertThat(params.getQueryParams()).isEqualTo(expected.build()) } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobCreateResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobCreateResponseTest.kt index f95e7603..330d1b6a 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobCreateResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/JobCreateResponseTest.kt @@ -11,15 +11,15 @@ class JobCreateResponseTest { fun createJobCreateResponse() { val jobCreateResponse = JobCreateResponse.builder() - .allowedRefreshes(123L) + .allowedRefreshes(0L) .jobId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") .jobUrl("job_url") - .remainingRefreshes(123L) + .remainingRefreshes(0L) .build() assertThat(jobCreateResponse).isNotNull - assertThat(jobCreateResponse.allowedRefreshes()).isEqualTo(123L) + assertThat(jobCreateResponse.allowedRefreshes()).isEqualTo(0L) assertThat(jobCreateResponse.jobId()).isEqualTo("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") assertThat(jobCreateResponse.jobUrl()).isEqualTo("job_url") - assertThat(jobCreateResponse.remainingRefreshes()).isEqualTo(123L) + assertThat(jobCreateResponse.remainingRefreshes()).isEqualTo(0L) } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/MoneyTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/MoneyTest.kt index bf32b66d..3d0dd64a 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/MoneyTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/MoneyTest.kt @@ -9,9 +9,9 @@ class MoneyTest { @Test fun createMoney() { - val money = Money.builder().amount(123L).currency("currency").build() + val money = Money.builder().amount(0L).currency("currency").build() assertThat(money).isNotNull - assertThat(money.amount()).contains(123L) + assertThat(money.amount()).contains(0L) assertThat(money.currency()).contains("currency") } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PagingTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PagingTest.kt index 77f20f68..896698f3 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PagingTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PagingTest.kt @@ -9,9 +9,9 @@ class PagingTest { @Test fun createPaging() { - val paging = Paging.builder().count(123L).offset(123L).build() + val paging = Paging.builder().count(0L).offset(0L).build() assertThat(paging).isNotNull - assertThat(paging.count()).contains(123L) - assertThat(paging.offset()).contains(123L) + assertThat(paging.count()).contains(0L) + assertThat(paging.offset()).contains(0L) } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseBodyTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseBodyTest.kt index 2f853838..e4f2f3f5 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseBodyTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseBodyTest.kt @@ -11,16 +11,16 @@ class PayStatementResponseBodyTest { fun createPayStatementResponseBody() { val payStatementResponseBody = PayStatementResponseBody.builder() - .paging(Paging.builder().count(123L).offset(123L).build()) + .paging(Paging.builder().count(0L).offset(0L).build()) .payStatements( listOf( PayStatement.builder() .earnings( listOf( PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type(PayStatement.Earning.Type.SALARY) .build() @@ -29,7 +29,7 @@ class PayStatementResponseBodyTest { .employeeDeductions( listOf( PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -40,21 +40,21 @@ class PayStatementResponseBodyTest { .employerContributions( listOf( PayStatement.EmployerContribution.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(PayStatement.PaymentMethod.CHECK) .taxes( listOf( PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -62,7 +62,7 @@ class PayStatementResponseBodyTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(PayStatement.Type.REGULAR_PAYROLL) .build() ) @@ -70,16 +70,16 @@ class PayStatementResponseBodyTest { .build() assertThat(payStatementResponseBody).isNotNull assertThat(payStatementResponseBody.paging()) - .contains(Paging.builder().count(123L).offset(123L).build()) + .contains(Paging.builder().count(0L).offset(0L).build()) assertThat(payStatementResponseBody.payStatements().get()) .containsExactly( PayStatement.builder() .earnings( listOf( PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type(PayStatement.Earning.Type.SALARY) .build() @@ -88,7 +88,7 @@ class PayStatementResponseBodyTest { .employeeDeductions( listOf( PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -99,21 +99,21 @@ class PayStatementResponseBodyTest { .employerContributions( listOf( PayStatement.EmployerContribution.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(PayStatement.PaymentMethod.CHECK) .taxes( listOf( PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -121,7 +121,7 @@ class PayStatementResponseBodyTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(PayStatement.Type.REGULAR_PAYROLL) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseTest.kt index 6c0b37eb..d86ad139 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementResponseTest.kt @@ -13,16 +13,16 @@ class PayStatementResponseTest { PayStatementResponse.builder() .body( PayStatementResponseBody.builder() - .paging(Paging.builder().count(123L).offset(123L).build()) + .paging(Paging.builder().count(0L).offset(0L).build()) .payStatements( listOf( PayStatement.builder() .earnings( listOf( PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type(PayStatement.Earning.Type.SALARY) .build() @@ -31,7 +31,7 @@ class PayStatementResponseTest { .employeeDeductions( listOf( PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -42,7 +42,7 @@ class PayStatementResponseTest { .employerContributions( listOf( PayStatement.EmployerContribution.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) @@ -50,17 +50,15 @@ class PayStatementResponseTest { ) ) .grossPay( - Money.builder().amount(123L).currency("currency").build() + Money.builder().amount(0L).currency("currency").build() ) .individualId("individual_id") - .netPay( - Money.builder().amount(123L).currency("currency").build() - ) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(PayStatement.PaymentMethod.CHECK) .taxes( listOf( PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -68,30 +66,30 @@ class PayStatementResponseTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(PayStatement.Type.REGULAR_PAYROLL) .build() ) ) .build() ) - .code(123L) + .code(0L) .paymentId("payment_id") .build() assertThat(payStatementResponse).isNotNull assertThat(payStatementResponse.body()) .contains( PayStatementResponseBody.builder() - .paging(Paging.builder().count(123L).offset(123L).build()) + .paging(Paging.builder().count(0L).offset(0L).build()) .payStatements( listOf( PayStatement.builder() .earnings( listOf( PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type(PayStatement.Earning.Type.SALARY) .build() @@ -100,7 +98,7 @@ class PayStatementResponseTest { .employeeDeductions( listOf( PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -111,21 +109,21 @@ class PayStatementResponseTest { .employerContributions( listOf( PayStatement.EmployerContribution.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(PayStatement.PaymentMethod.CHECK) .taxes( listOf( PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -133,14 +131,14 @@ class PayStatementResponseTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(PayStatement.Type.REGULAR_PAYROLL) .build() ) ) .build() ) - assertThat(payStatementResponse.code()).contains(123L) + assertThat(payStatementResponse.code()).contains(0L) assertThat(payStatementResponse.paymentId()).contains("payment_id") } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementTest.kt index 24997779..3432b7c7 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PayStatementTest.kt @@ -14,9 +14,9 @@ class PayStatementTest { .earnings( listOf( PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type(PayStatement.Earning.Type.SALARY) .build() @@ -25,7 +25,7 @@ class PayStatementTest { .employeeDeductions( listOf( PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -36,21 +36,21 @@ class PayStatementTest { .employerContributions( listOf( PayStatement.EmployerContribution.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(PayStatement.PaymentMethod.CHECK) .taxes( listOf( PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -58,16 +58,16 @@ class PayStatementTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(PayStatement.Type.REGULAR_PAYROLL) .build() assertThat(payStatement).isNotNull assertThat(payStatement.earnings().get()) .containsExactly( PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type(PayStatement.Earning.Type.SALARY) .build() @@ -75,7 +75,7 @@ class PayStatementTest { assertThat(payStatement.employeeDeductions().get()) .containsExactly( PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -85,29 +85,29 @@ class PayStatementTest { assertThat(payStatement.employerContributions().get()) .containsExactly( PayStatement.EmployerContribution.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) assertThat(payStatement.grossPay()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payStatement.individualId()).contains("individual_id") assertThat(payStatement.netPay()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payStatement.paymentMethod()).contains(PayStatement.PaymentMethod.CHECK) assertThat(payStatement.taxes().get()) .containsExactly( PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") .type(PayStatement.Tax.Type.STATE) .build() ) - assertThat(payStatement.totalHours()).contains(42.23) + assertThat(payStatement.totalHours()).contains(0.0) assertThat(payStatement.type()).contains(PayStatement.Type.REGULAR_PAYROLL) } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PaymentTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PaymentTest.kt index 2facf1d5..8f12e7a9 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PaymentTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/PaymentTest.kt @@ -12,13 +12,13 @@ class PaymentTest { val payment = Payment.builder() .id("id") - .companyDebit(Money.builder().amount(123L).currency("currency").build()) + .companyDebit(Money.builder().amount(0L).currency("currency").build()) .debitDate("debit_date") - .employeeTaxes(Money.builder().amount(123L).currency("currency").build()) - .employerTaxes(Money.builder().amount(123L).currency("currency").build()) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .employeeTaxes(Money.builder().amount(0L).currency("currency").build()) + .employerTaxes(Money.builder().amount(0L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualIds(listOf("string")) - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .payDate("pay_date") .payFrequencies(listOf(Payment.PayFrequency.ANNUALLY)) .payGroupIds(listOf("string")) @@ -29,17 +29,17 @@ class PaymentTest { assertThat(payment).isNotNull assertThat(payment.id()).contains("id") assertThat(payment.companyDebit()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payment.debitDate()).contains("debit_date") assertThat(payment.employeeTaxes()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payment.employerTaxes()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payment.grossPay()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payment.individualIds().get()).containsExactly("string") assertThat(payment.netPay()) - .contains(Money.builder().amount(123L).currency("currency").build()) + .contains(Money.builder().amount(0L).currency("currency").build()) assertThat(payment.payDate()).contains("pay_date") assertThat(payment.payFrequencies().get()).containsExactly(Payment.PayFrequency.ANNUALLY) assertThat(payment.payGroupIds().get()).containsExactly("string") diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponseTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponseTest.kt index d926d7af..27866e1e 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponseTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/RequestForwardingForwardResponseTest.kt @@ -23,7 +23,7 @@ class RequestForwardingForwardResponseTest { .route("route") .build() ) - .statusCode(123L) + .statusCode(0L) .build() assertThat(requestForwardingForwardResponse).isNotNull assertThat(requestForwardingForwardResponse.data()).contains("data") @@ -38,6 +38,6 @@ class RequestForwardingForwardResponseTest { .route("route") .build() ) - assertThat(requestForwardingForwardResponse.statusCode()).isEqualTo(123L) + assertThat(requestForwardingForwardResponse.statusCode()).isEqualTo(0L) } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParamsTest.kt index 0a8542d0..ccd07bab 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxConnectionCreateParamsTest.kt @@ -13,7 +13,7 @@ class SandboxConnectionCreateParamsTest { SandboxConnectionCreateParams.builder() .providerId("provider_id") .authenticationType(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL) - .employeeSize(123L) + .employeeSize(0L) .products(listOf("string")) .build() } @@ -24,7 +24,7 @@ class SandboxConnectionCreateParamsTest { SandboxConnectionCreateParams.builder() .providerId("provider_id") .authenticationType(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL) - .employeeSize(123L) + .employeeSize(0L) .products(listOf("string")) .build() val body = params.getBody() @@ -32,7 +32,7 @@ class SandboxConnectionCreateParamsTest { assertThat(body.providerId()).isEqualTo("provider_id") assertThat(body.authenticationType()) .isEqualTo(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL) - assertThat(body.employeeSize()).isEqualTo(123L) + assertThat(body.employeeSize()).isEqualTo(0L) assertThat(body.products()).isEqualTo(listOf("string")) } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParamsTest.kt index 77aba97d..295706c9 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxDirectoryCreateParamsTest.kt @@ -66,7 +66,7 @@ class SandboxDirectoryCreateParamsTest { .gender(SandboxDirectoryCreateParams.IndividualOrEmployment.Gender.FEMALE) .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -75,7 +75,7 @@ class SandboxDirectoryCreateParamsTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -206,7 +206,7 @@ class SandboxDirectoryCreateParamsTest { ) .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -215,7 +215,7 @@ class SandboxDirectoryCreateParamsTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -336,7 +336,7 @@ class SandboxDirectoryCreateParamsTest { .gender(SandboxDirectoryCreateParams.IndividualOrEmployment.Gender.FEMALE) .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -345,7 +345,7 @@ class SandboxDirectoryCreateParamsTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParamsTest.kt index 01f07445..a8f9263b 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxEmploymentUpdateParamsTest.kt @@ -33,7 +33,7 @@ class SandboxEmploymentUpdateParamsTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -42,7 +42,7 @@ class SandboxEmploymentUpdateParamsTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -97,7 +97,7 @@ class SandboxEmploymentUpdateParamsTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -106,7 +106,7 @@ class SandboxEmploymentUpdateParamsTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -160,7 +160,7 @@ class SandboxEmploymentUpdateParamsTest { assertThat(body.income()) .isEqualTo( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -170,7 +170,7 @@ class SandboxEmploymentUpdateParamsTest { .isEqualTo( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParamsTest.kt index 23a11ecd..feb52a81 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/SandboxPaymentCreateParamsTest.kt @@ -18,9 +18,9 @@ class SandboxPaymentCreateParamsTest { .earnings( listOf( SandboxPaymentCreateParams.PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type( SandboxPaymentCreateParams.PayStatement.Earning.Type.SALARY @@ -31,7 +31,7 @@ class SandboxPaymentCreateParamsTest { .employeeDeductions( listOf( SandboxPaymentCreateParams.PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -43,21 +43,21 @@ class SandboxPaymentCreateParamsTest { listOf( SandboxPaymentCreateParams.PayStatement.EmployerContribution .builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(SandboxPaymentCreateParams.PayStatement.PaymentMethod.CHECK) .taxes( listOf( SandboxPaymentCreateParams.PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -65,7 +65,7 @@ class SandboxPaymentCreateParamsTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(SandboxPaymentCreateParams.PayStatement.Type.REGULAR_PAYROLL) .build() ) @@ -85,9 +85,9 @@ class SandboxPaymentCreateParamsTest { .earnings( listOf( SandboxPaymentCreateParams.PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type( SandboxPaymentCreateParams.PayStatement.Earning.Type @@ -100,7 +100,7 @@ class SandboxPaymentCreateParamsTest { listOf( SandboxPaymentCreateParams.PayStatement.EmployeeDeduction .builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -112,23 +112,23 @@ class SandboxPaymentCreateParamsTest { listOf( SandboxPaymentCreateParams.PayStatement.EmployerContribution .builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod( SandboxPaymentCreateParams.PayStatement.PaymentMethod.CHECK ) .taxes( listOf( SandboxPaymentCreateParams.PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -138,7 +138,7 @@ class SandboxPaymentCreateParamsTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(SandboxPaymentCreateParams.PayStatement.Type.REGULAR_PAYROLL) .build() ) @@ -155,9 +155,9 @@ class SandboxPaymentCreateParamsTest { .earnings( listOf( SandboxPaymentCreateParams.PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type( SandboxPaymentCreateParams.PayStatement.Earning.Type.SALARY @@ -168,7 +168,7 @@ class SandboxPaymentCreateParamsTest { .employeeDeductions( listOf( SandboxPaymentCreateParams.PayStatement.EmployeeDeduction.builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -180,21 +180,21 @@ class SandboxPaymentCreateParamsTest { listOf( SandboxPaymentCreateParams.PayStatement.EmployerContribution .builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod(SandboxPaymentCreateParams.PayStatement.PaymentMethod.CHECK) .taxes( listOf( SandboxPaymentCreateParams.PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -202,7 +202,7 @@ class SandboxPaymentCreateParamsTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(SandboxPaymentCreateParams.PayStatement.Type.REGULAR_PAYROLL) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/UnenrolledIndividualTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/UnenrolledIndividualTest.kt index f2c22f0f..6f4f0b7f 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/models/UnenrolledIndividualTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/models/UnenrolledIndividualTest.kt @@ -18,7 +18,7 @@ class UnenrolledIndividualTest { .name("name") .build() ) - .code(123L) + .code(0L) .individualId("individual_id") .build() assertThat(unenrolledIndividual).isNotNull @@ -30,7 +30,7 @@ class UnenrolledIndividualTest { .name("name") .build() ) - assertThat(unenrolledIndividual.code()).contains(123L) + assertThat(unenrolledIndividual.code()).contains(0L) assertThat(unenrolledIndividual.individualId()).contains("individual_id") } } diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ServiceParamsTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ServiceParamsTest.kt index deb4f72d..5c4e5abb 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ServiceParamsTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/ServiceParamsTest.kt @@ -53,8 +53,8 @@ class ServiceParamsTest { val params = HrisDirectoryListParams.builder() - .limit(123L) - .offset(123L) + .limit(0L) + .offset(0L) .additionalHeaders(additionalHeaders) .additionalQueryParams(additionalQueryParams) .build() @@ -76,7 +76,7 @@ class ServiceParamsTest { .build() ) ) - .paging(Paging.builder().count(123L).offset(123L).build()) + .paging(Paging.builder().count(0L).offset(0L).build()) .build() stubFor( diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/WebhookServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/WebhookServiceTest.kt index 7380455a..fb41874d 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/WebhookServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/WebhookServiceTest.kt @@ -2,7 +2,6 @@ package com.tryfinch.api.services.blocking -import com.google.common.collect.ImmutableListMultimap import com.tryfinch.api.TestServerExtension import com.tryfinch.api.client.okhttp.FinchOkHttpClient import com.tryfinch.api.core.http.Headers diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceTest.kt index 3f8f3e57..d4831db2 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/connect/SessionServiceTest.kt @@ -33,7 +33,7 @@ class SessionServiceTest { .build() ) .manual(true) - .minutesToExpire(42.23) + .minutesToExpire(1.0) .redirectUri("redirect_uri") .sandbox(ConnectSessionNewParams.Sandbox.FINCH) .build() @@ -54,7 +54,7 @@ class SessionServiceTest { sessionService.reauthenticate( ConnectSessionReauthenticateParams.builder() .connectionId("connection_id") - .minutesToExpire(123L) + .minutesToExpire(0L) .products(listOf(ConnectSessionReauthenticateParams.ConnectProducts.COMPANY)) .redirectUri("https://example.com") .build() diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceTest.kt index 63f9e15a..59da45e0 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/ConnectionServiceTest.kt @@ -24,7 +24,7 @@ class ConnectionServiceTest { SandboxConnectionCreateParams.builder() .providerId("provider_id") .authenticationType(SandboxConnectionCreateParams.AuthenticationType.CREDENTIAL) - .employeeSize(123L) + .employeeSize(0L) .products(listOf("string")) .build() ) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceTest.kt index c44d7c5e..a5af1399 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/DirectoryServiceTest.kt @@ -88,7 +88,7 @@ class DirectoryServiceTest { ) .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -97,7 +97,7 @@ class DirectoryServiceTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceTest.kt index f02240b7..9b1bea7f 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/EmploymentServiceTest.kt @@ -46,7 +46,7 @@ class EmploymentServiceTest { .firstName("first_name") .income( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) @@ -55,7 +55,7 @@ class EmploymentServiceTest { .incomeHistory( listOf( Income.builder() - .amount(123L) + .amount(0L) .currency("currency") .effectiveDate("effective_date") .unit(Income.Unit.YEARLY) diff --git a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceTest.kt b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceTest.kt index ea9c6c62..01442f8a 100644 --- a/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceTest.kt +++ b/finch-java-core/src/test/kotlin/com/tryfinch/api/services/blocking/sandbox/PaymentServiceTest.kt @@ -29,9 +29,9 @@ class PaymentServiceTest { .earnings( listOf( SandboxPaymentCreateParams.PayStatement.Earning.builder() - .amount(123L) + .amount(0L) .currency("currency") - .hours(42.23) + .hours(0.0) .name("name") .type( SandboxPaymentCreateParams.PayStatement.Earning.Type @@ -44,7 +44,7 @@ class PaymentServiceTest { listOf( SandboxPaymentCreateParams.PayStatement.EmployeeDeduction .builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .preTax(true) @@ -56,23 +56,23 @@ class PaymentServiceTest { listOf( SandboxPaymentCreateParams.PayStatement.EmployerContribution .builder() - .amount(123L) + .amount(0L) .currency("currency") .name("name") .type(BenefitType._401K) .build() ) ) - .grossPay(Money.builder().amount(123L).currency("currency").build()) + .grossPay(Money.builder().amount(0L).currency("currency").build()) .individualId("individual_id") - .netPay(Money.builder().amount(123L).currency("currency").build()) + .netPay(Money.builder().amount(0L).currency("currency").build()) .paymentMethod( SandboxPaymentCreateParams.PayStatement.PaymentMethod.CHECK ) .taxes( listOf( SandboxPaymentCreateParams.PayStatement.Tax.builder() - .amount(123L) + .amount(0L) .currency("currency") .employer(true) .name("name") @@ -83,7 +83,7 @@ class PaymentServiceTest { .build() ) ) - .totalHours(42.23) + .totalHours(0.0) .type(SandboxPaymentCreateParams.PayStatement.Type.REGULAR_PAYROLL) .build() )