From 1a3f8385ab53f46a905288f227135344aa9d719c Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 21 Nov 2024 10:57:15 +0000 Subject: [PATCH] chore(internal): codegen related update --- .../so/prelude/sdk/errors/PreludeError.kt | 26 +++---- .../sdk/models/TransactionalSendParams.kt | 32 +++----- .../sdk/models/TransactionalSendResponse.kt | 26 +++---- .../sdk/models/VerificationCheckParams.kt | 34 ++++----- .../sdk/models/VerificationCheckResponse.kt | 28 +++---- .../sdk/models/VerificationCreateParams.kt | 75 +++++++------------ .../sdk/models/VerificationCreateResponse.kt | 30 +++----- .../prelude/sdk/models/WatchFeedBackParams.kt | 49 +++++------- .../sdk/models/WatchFeedBackResponse.kt | 13 ++-- .../prelude/sdk/models/WatchPredictParams.kt | 47 +++++------- .../sdk/models/WatchPredictResponse.kt | 30 +++----- 11 files changed, 153 insertions(+), 237 deletions(-) diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/errors/PreludeError.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/errors/PreludeError.kt index e8c8d87..ee33f0d 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/errors/PreludeError.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/errors/PreludeError.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 PreludeError && this.additionalProperties == other.additionalProperties /* spotless:on */ - } - - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */ - } - - override fun toString() = "PreludeError{additionalProperties=$additionalProperties}" - fun toBuilder() = Builder().from(this) companion object { @@ -71,4 +57,16 @@ private constructor( fun build(): PreludeError = PreludeError(additionalProperties.toImmutable()) } + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return /* spotless:off */ other is PreludeError && additionalProperties == other.additionalProperties /* spotless:on */ + } + + override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */ + + override fun toString() = "PreludeError{additionalProperties=$additionalProperties}" } diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendParams.kt index b9ac70f..793068d 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendParams.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendParams.kt @@ -189,17 +189,14 @@ constructor( return true } - return /* spotless:off */ other is TransactionalSendBody && this.templateId == other.templateId && this.to == other.to && this.callbackUrl == other.callbackUrl && this.correlationId == other.correlationId && this.expiresAt == other.expiresAt && this.from == other.from && this.variables == other.variables && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is TransactionalSendBody && templateId == other.templateId && to == other.to && callbackUrl == other.callbackUrl && correlationId == other.correlationId && expiresAt == other.expiresAt && from == other.from && variables == other.variables && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(templateId, to, callbackUrl, correlationId, expiresAt, from, variables, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(templateId, to, callbackUrl, correlationId, expiresAt, from, variables, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "TransactionalSendBody{templateId=$templateId, to=$to, callbackUrl=$callbackUrl, correlationId=$correlationId, expiresAt=$expiresAt, from=$from, variables=$variables, additionalProperties=$additionalProperties}" @@ -216,12 +213,10 @@ constructor( return true } - return /* spotless:off */ other is TransactionalSendParams && this.templateId == other.templateId && this.to == other.to && this.callbackUrl == other.callbackUrl && this.correlationId == other.correlationId && this.expiresAt == other.expiresAt && this.from == other.from && this.variables == other.variables && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + return /* spotless:off */ other is TransactionalSendParams && templateId == other.templateId && to == other.to && callbackUrl == other.callbackUrl && correlationId == other.correlationId && expiresAt == other.expiresAt && from == other.from && variables == other.variables && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(templateId, to, callbackUrl, correlationId, expiresAt, from, variables, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(templateId, to, callbackUrl, correlationId, expiresAt, from, variables, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ override fun toString() = "TransactionalSendParams{templateId=$templateId, to=$to, callbackUrl=$callbackUrl, correlationId=$correlationId, expiresAt=$expiresAt, from=$from, variables=$variables, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" @@ -467,17 +462,14 @@ constructor( return true } - return /* spotless:off */ other is Variables && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Variables && 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() = "Variables{additionalProperties=$additionalProperties}" } diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendResponse.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendResponse.kt index 44e33ec..67333be 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendResponse.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/TransactionalSendResponse.kt @@ -300,17 +300,14 @@ private constructor( return true } - return /* spotless:off */ other is Variables && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Variables && 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() = "Variables{additionalProperties=$additionalProperties}" } @@ -320,17 +317,14 @@ private constructor( return true } - return /* spotless:off */ other is TransactionalSendResponse && this.id == other.id && this.from == other.from && this.to == other.to && this.templateId == other.templateId && this.variables == other.variables && this.callbackUrl == other.callbackUrl && this.correlationId == other.correlationId && this.expiresAt == other.expiresAt && this.createdAt == other.createdAt && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is TransactionalSendResponse && id == other.id && from == other.from && to == other.to && templateId == other.templateId && variables == other.variables && callbackUrl == other.callbackUrl && correlationId == other.correlationId && expiresAt == other.expiresAt && createdAt == other.createdAt && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, from, to, templateId, variables, callbackUrl, correlationId, expiresAt, createdAt, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, from, to, templateId, variables, callbackUrl, correlationId, expiresAt, createdAt, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "TransactionalSendResponse{id=$id, from=$from, to=$to, templateId=$templateId, variables=$variables, callbackUrl=$callbackUrl, correlationId=$correlationId, expiresAt=$expiresAt, createdAt=$createdAt, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckParams.kt index 63000cf..7be435d 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckParams.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckParams.kt @@ -117,17 +117,14 @@ constructor( return true } - return /* spotless:off */ other is VerificationCheckBody && this.code == other.code && this.target == other.target && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is VerificationCheckBody && code == other.code && target == other.target && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(code, target, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(code, target, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "VerificationCheckBody{code=$code, target=$target, additionalProperties=$additionalProperties}" @@ -144,12 +141,10 @@ constructor( return true } - return /* spotless:off */ other is VerificationCheckParams && this.code == other.code && this.target == other.target && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + return /* spotless:off */ other is VerificationCheckParams && code == other.code && target == other.target && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(code, target, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(code, target, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ override fun toString() = "VerificationCheckParams{code=$code, target=$target, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" @@ -396,7 +391,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() @@ -439,17 +434,14 @@ constructor( return true } - return /* spotless:off */ other is Target && this.type == other.type && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Target && type == other.type && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Target{type=$type, value=$value, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckResponse.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckResponse.kt index 4277c60..8f07637 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckResponse.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCheckResponse.kt @@ -218,17 +218,14 @@ private constructor( return true } - return /* spotless:off */ other is Metadata && this.correlationId == other.correlationId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Metadata && correlationId == other.correlationId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(correlationId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(correlationId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Metadata{correlationId=$correlationId, additionalProperties=$additionalProperties}" @@ -247,7 +244,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() @@ -302,17 +299,14 @@ private constructor( return true } - return /* spotless:off */ other is VerificationCheckResponse && this.id == other.id && this.status == other.status && this.metadata == other.metadata && this.requestId == other.requestId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is VerificationCheckResponse && id == other.id && status == other.status && metadata == other.metadata && requestId == other.requestId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, status, metadata, requestId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, status, metadata, requestId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "VerificationCheckResponse{id=$id, status=$status, metadata=$metadata, requestId=$requestId, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateParams.kt index 1c40ae9..7b88396 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateParams.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateParams.kt @@ -155,17 +155,14 @@ constructor( return true } - return /* spotless:off */ other is VerificationCreateBody && this.target == other.target && this.metadata == other.metadata && this.options == other.options && this.signals == other.signals && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is VerificationCreateBody && target == other.target && metadata == other.metadata && options == other.options && signals == other.signals && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(target, metadata, options, signals, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(target, metadata, options, signals, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "VerificationCreateBody{target=$target, metadata=$metadata, options=$options, signals=$signals, additionalProperties=$additionalProperties}" @@ -182,12 +179,10 @@ constructor( return true } - return /* spotless:off */ other is VerificationCreateParams && this.target == other.target && this.metadata == other.metadata && this.options == other.options && this.signals == other.signals && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + return /* spotless:off */ other is VerificationCreateParams && target == other.target && metadata == other.metadata && options == other.options && signals == other.signals && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(target, metadata, options, signals, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(target, metadata, options, signals, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ override fun toString() = "VerificationCreateParams{target=$target, metadata=$metadata, options=$options, signals=$signals, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" @@ -449,7 +444,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() @@ -492,17 +487,14 @@ constructor( return true } - return /* spotless:off */ other is Target && this.type == other.type && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Target && type == other.type && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Target{type=$type, value=$value, additionalProperties=$additionalProperties}" @@ -571,17 +563,14 @@ constructor( return true } - return /* spotless:off */ other is Metadata && this.correlationId == other.correlationId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Metadata && correlationId == other.correlationId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(correlationId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(correlationId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Metadata{correlationId=$correlationId, additionalProperties=$additionalProperties}" @@ -724,17 +713,14 @@ constructor( return true } - return /* spotless:off */ other is Options && this.templateId == other.templateId && this.locale == other.locale && this.senderId == other.senderId && this.appRealm == other.appRealm && this.customCode == other.customCode && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Options && templateId == other.templateId && locale == other.locale && senderId == other.senderId && appRealm == other.appRealm && customCode == other.customCode && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(templateId, locale, senderId, appRealm, customCode, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(templateId, locale, senderId, appRealm, customCode, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Options{templateId=$templateId, locale=$locale, senderId=$senderId, appRealm=$appRealm, customCode=$customCode, additionalProperties=$additionalProperties}" @@ -891,7 +877,7 @@ constructor( return true } - return /* spotless:off */ other is DevicePlatform && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is DevicePlatform && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -958,17 +944,14 @@ constructor( return true } - return /* spotless:off */ other is Signals && this.ip == other.ip && this.deviceId == other.deviceId && this.devicePlatform == other.devicePlatform && this.deviceModel == other.deviceModel && this.osVersion == other.osVersion && this.appVersion == other.appVersion && this.isTrustedUser == other.isTrustedUser && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Signals && ip == other.ip && deviceId == other.deviceId && devicePlatform == other.devicePlatform && deviceModel == other.deviceModel && osVersion == other.osVersion && appVersion == other.appVersion && isTrustedUser == other.isTrustedUser && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(ip, deviceId, devicePlatform, deviceModel, osVersion, appVersion, isTrustedUser, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(ip, deviceId, devicePlatform, deviceModel, osVersion, appVersion, isTrustedUser, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Signals{ip=$ip, deviceId=$deviceId, devicePlatform=$devicePlatform, deviceModel=$deviceModel, osVersion=$osVersion, appVersion=$appVersion, isTrustedUser=$isTrustedUser, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateResponse.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateResponse.kt index b51bf97..50dee27 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateResponse.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/VerificationCreateResponse.kt @@ -237,17 +237,14 @@ private constructor( return true } - return /* spotless:off */ other is Metadata && this.correlationId == other.correlationId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Metadata && correlationId == other.correlationId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(correlationId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(correlationId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Metadata{correlationId=$correlationId, additionalProperties=$additionalProperties}" @@ -266,7 +263,7 @@ private constructor( return true } - return /* spotless:off */ other is Method && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Method && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -317,7 +314,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() @@ -372,17 +369,14 @@ private constructor( return true } - return /* spotless:off */ other is VerificationCreateResponse && this.id == other.id && this.status == other.status && this.method == other.method && this.metadata == other.metadata && this.requestId == other.requestId && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is VerificationCreateResponse && id == other.id && status == other.status && method == other.method && metadata == other.metadata && requestId == other.requestId && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, status, method, metadata, requestId, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, status, method, metadata, requestId, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "VerificationCreateResponse{id=$id, status=$status, method=$method, metadata=$metadata, requestId=$requestId, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackParams.kt index 174fc0f..a3a3ca4 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackParams.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackParams.kt @@ -124,17 +124,14 @@ constructor( return true } - return /* spotless:off */ other is WatchFeedBackBody && this.feedback == other.feedback && this.target == other.target && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is WatchFeedBackBody && feedback == other.feedback && target == other.target && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(feedback, target, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(feedback, target, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "WatchFeedBackBody{feedback=$feedback, target=$target, additionalProperties=$additionalProperties}" @@ -151,12 +148,10 @@ constructor( return true } - return /* spotless:off */ other is WatchFeedBackParams && this.feedback == other.feedback && this.target == other.target && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + return /* spotless:off */ other is WatchFeedBackParams && feedback == other.feedback && target == other.target && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(feedback, target, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(feedback, target, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ override fun toString() = "WatchFeedBackParams{feedback=$feedback, target=$target, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" @@ -405,7 +400,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() @@ -448,17 +443,14 @@ constructor( return true } - return /* spotless:off */ other is Feedback && this.type == other.type && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Feedback && 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() = "Feedback{type=$type, additionalProperties=$additionalProperties}" } @@ -544,7 +536,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() @@ -587,17 +579,14 @@ constructor( return true } - return /* spotless:off */ other is Target && this.type == other.type && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Target && type == other.type && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Target{type=$type, value=$value, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackResponse.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackResponse.kt index fe115b0..1df4dd6 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackResponse.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchFeedBackResponse.kt @@ -89,17 +89,14 @@ private constructor( return true } - return /* spotless:off */ other is WatchFeedBackResponse && this.id == other.id && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is WatchFeedBackResponse && 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() = "WatchFeedBackResponse{id=$id, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictParams.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictParams.kt index 39fcdae..e286f7a 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictParams.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictParams.kt @@ -124,17 +124,14 @@ constructor( return true } - return /* spotless:off */ other is WatchPredictBody && this.target == other.target && this.signals == other.signals && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is WatchPredictBody && target == other.target && signals == other.signals && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(target, signals, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(target, signals, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "WatchPredictBody{target=$target, signals=$signals, additionalProperties=$additionalProperties}" @@ -151,12 +148,10 @@ constructor( return true } - return /* spotless:off */ other is WatchPredictParams && this.target == other.target && this.signals == other.signals && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ + return /* spotless:off */ other is WatchPredictParams && target == other.target && signals == other.signals && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */ } - override fun hashCode(): Int { - return /* spotless:off */ Objects.hash(target, signals, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ - } + override fun hashCode(): Int = /* spotless:off */ Objects.hash(target, signals, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */ override fun toString() = "WatchPredictParams{target=$target, signals=$signals, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}" @@ -405,7 +400,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() @@ -448,17 +443,14 @@ constructor( return true } - return /* spotless:off */ other is Target && this.type == other.type && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Target && type == other.type && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(type, value, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(type, value, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Target{type=$type, value=$value, additionalProperties=$additionalProperties}" @@ -566,17 +558,14 @@ constructor( return true } - return /* spotless:off */ other is Signals && this.ip == other.ip && this.deviceId == other.deviceId && this.deviceType == other.deviceType && this.deviceModel == other.deviceModel && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Signals && ip == other.ip && deviceId == other.deviceId && deviceType == other.deviceType && deviceModel == other.deviceModel && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(ip, deviceId, deviceType, deviceModel, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(ip, deviceId, deviceType, deviceModel, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Signals{ip=$ip, deviceId=$deviceId, deviceType=$deviceType, deviceModel=$deviceModel, additionalProperties=$additionalProperties}" diff --git a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictResponse.kt b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictResponse.kt index ea76fb0..9be22fb 100644 --- a/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictResponse.kt +++ b/prelude-java-core/src/main/kotlin/so/prelude/sdk/models/WatchPredictResponse.kt @@ -138,7 +138,7 @@ private constructor( return true } - return /* spotless:off */ other is Prediction && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Prediction && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -300,7 +300,7 @@ private constructor( return true } - return /* spotless:off */ other is Cause && this.value == other.value /* spotless:on */ + return /* spotless:off */ other is Cause && value == other.value /* spotless:on */ } override fun hashCode() = value.hashCode() @@ -361,17 +361,14 @@ private constructor( return true } - return /* spotless:off */ other is Reasoning && this.cause == other.cause && this.score == other.score && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is Reasoning && cause == other.cause && score == other.score && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(cause, score, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(cause, score, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "Reasoning{cause=$cause, score=$score, additionalProperties=$additionalProperties}" @@ -382,17 +379,14 @@ private constructor( return true } - return /* spotless:off */ other is WatchPredictResponse && this.id == other.id && this.prediction == other.prediction && this.reasoning == other.reasoning && this.additionalProperties == other.additionalProperties /* spotless:on */ + return /* spotless:off */ other is WatchPredictResponse && id == other.id && prediction == other.prediction && reasoning == other.reasoning && additionalProperties == other.additionalProperties /* spotless:on */ } - private var hashCode: Int = 0 + /* spotless:off */ + private val hashCode: Int by lazy { Objects.hash(id, prediction, reasoning, additionalProperties) } + /* spotless:on */ - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = /* spotless:off */ Objects.hash(id, prediction, reasoning, additionalProperties) /* spotless:on */ - } - return hashCode - } + override fun hashCode(): Int = hashCode override fun toString() = "WatchPredictResponse{id=$id, prediction=$prediction, reasoning=$reasoning, additionalProperties=$additionalProperties}"