Skip to content

Commit 224921d

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): codegen related update (#52)
1 parent 49217e1 commit 224921d

29 files changed

+341
-536
lines changed

openlayer-java-core/build.gradle.kts

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ plugins {
44
}
55

66
dependencies {
7-
api("com.fasterxml.jackson.core:jackson-core:2.14.3")
8-
api("com.fasterxml.jackson.core:jackson-databind:2.14.3")
7+
api("com.fasterxml.jackson.core:jackson-core:2.18.1")
8+
api("com.fasterxml.jackson.core:jackson-databind:2.18.1")
99

10-
implementation("com.fasterxml.jackson.core:jackson-annotations:2.14.3")
11-
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.3")
12-
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.3")
13-
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.3")
10+
implementation("com.fasterxml.jackson.core:jackson-annotations:2.18.1")
11+
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.1")
12+
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.1")
13+
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.1")
1414
implementation("org.apache.httpcomponents.core5:httpcore5:5.2.4")
1515
implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")
1616

openlayer-java-core/src/main/kotlin/com/openlayer/api/errors/OpenlayerError.kt

+12-14
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,6 @@ private constructor(
1919
val additionalProperties: Map<String, JsonValue>,
2020
) {
2121

22-
override fun equals(other: Any?): Boolean {
23-
if (this === other) {
24-
return true
25-
}
26-
27-
return /* spotless:off */ other is OpenlayerError && this.additionalProperties == other.additionalProperties /* spotless:on */
28-
}
29-
30-
override fun hashCode(): Int {
31-
return /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */
32-
}
33-
34-
override fun toString() = "OpenlayerError{additionalProperties=$additionalProperties}"
35-
3622
fun toBuilder() = Builder().from(this)
3723

3824
companion object {
@@ -71,4 +57,16 @@ private constructor(
7157

7258
fun build(): OpenlayerError = OpenlayerError(additionalProperties.toImmutable())
7359
}
60+
61+
override fun equals(other: Any?): Boolean {
62+
if (this === other) {
63+
return true
64+
}
65+
66+
return /* spotless:off */ other is OpenlayerError && additionalProperties == other.additionalProperties /* spotless:on */
67+
}
68+
69+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(additionalProperties) /* spotless:on */
70+
71+
override fun toString() = "OpenlayerError{additionalProperties=$additionalProperties}"
7472
}

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt

+4-6
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ constructor(
6868
return true
6969
}
7070

71-
return /* spotless:off */ other is CommitTestResultListParams && this.projectVersionId == other.projectVersionId && this.includeArchived == other.includeArchived && this.page == other.page && this.perPage == other.perPage && this.status == other.status && this.type == other.type && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */
71+
return /* spotless:off */ other is CommitTestResultListParams && projectVersionId == other.projectVersionId && includeArchived == other.includeArchived && page == other.page && perPage == other.perPage && status == other.status && type == other.type && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
7272
}
7373

74-
override fun hashCode(): Int {
75-
return /* spotless:off */ Objects.hash(projectVersionId, includeArchived, page, perPage, status, type, additionalHeaders, additionalQueryParams) /* spotless:on */
76-
}
74+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(projectVersionId, includeArchived, page, perPage, status, type, additionalHeaders, additionalQueryParams) /* spotless:on */
7775

7876
override fun toString() =
7977
"CommitTestResultListParams{projectVersionId=$projectVersionId, includeArchived=$includeArchived, page=$page, perPage=$perPage, status=$status, type=$type, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
@@ -260,7 +258,7 @@ constructor(
260258
return true
261259
}
262260

263-
return /* spotless:off */ other is Status && this.value == other.value /* spotless:on */
261+
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
264262
}
265263

266264
override fun hashCode() = value.hashCode()
@@ -335,7 +333,7 @@ constructor(
335333
return true
336334
}
337335

338-
return /* spotless:off */ other is Type && this.value == other.value /* spotless:on */
336+
return /* spotless:off */ other is Type && value == other.value /* spotless:on */
339337
}
340338

341339
override fun hashCode() = value.hashCode()

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt

+25-40
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ private constructor(
396396
return true
397397
}
398398

399-
return /* spotless:off */ other is Status && this.value == other.value /* spotless:on */
399+
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
400400
}
401401

402402
override fun hashCode() = value.hashCode()
@@ -1208,23 +1208,20 @@ private constructor(
12081208
return true
12091209
}
12101210

1211-
return /* spotless:off */ other is Value && this.number == other.number && this.bool == other.bool && this.string == other.string && this.strings == other.strings /* spotless:on */
1211+
return /* spotless:off */ other is Value && number == other.number && bool == other.bool && string == other.string && strings == other.strings /* spotless:on */
12121212
}
12131213

1214-
override fun hashCode(): Int {
1215-
return /* spotless:off */ Objects.hash(number, bool, string, strings) /* spotless:on */
1216-
}
1214+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(number, bool, string, strings) /* spotless:on */
12171215

1218-
override fun toString(): String {
1219-
return when {
1216+
override fun toString(): String =
1217+
when {
12201218
number != null -> "Value{number=$number}"
12211219
bool != null -> "Value{bool=$bool}"
12221220
string != null -> "Value{string=$string}"
12231221
strings != null -> "Value{strings=$strings}"
12241222
_json != null -> "Value{_unknown=$_json}"
12251223
else -> throw IllegalStateException("Invalid Value")
12261224
}
1227-
}
12281225

12291226
companion object {
12301227

@@ -1298,17 +1295,14 @@ private constructor(
12981295
return true
12991296
}
13001297

1301-
return /* spotless:off */ other is Threshold && this.measurement == other.measurement && this.insightName == other.insightName && this.insightParameters == other.insightParameters && this.operator == other.operator && this.value == other.value && this.additionalProperties == other.additionalProperties /* spotless:on */
1298+
return /* spotless:off */ other is Threshold && measurement == other.measurement && insightName == other.insightName && insightParameters == other.insightParameters && operator == other.operator && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */
13021299
}
13031300

1304-
private var hashCode: Int = 0
1301+
/* spotless:off */
1302+
private val hashCode: Int by lazy { Objects.hash(measurement, insightName, insightParameters, operator, value, additionalProperties) }
1303+
/* spotless:on */
13051304

1306-
override fun hashCode(): Int {
1307-
if (hashCode == 0) {
1308-
hashCode = /* spotless:off */ Objects.hash(measurement, insightName, insightParameters, operator, value, additionalProperties) /* spotless:on */
1309-
}
1310-
return hashCode
1311-
}
1305+
override fun hashCode(): Int = hashCode
13121306

13131307
override fun toString() =
13141308
"Threshold{measurement=$measurement, insightName=$insightName, insightParameters=$insightParameters, operator=$operator, value=$value, additionalProperties=$additionalProperties}"
@@ -1319,17 +1313,14 @@ private constructor(
13191313
return true
13201314
}
13211315

1322-
return /* spotless:off */ other is Goal && this.id == other.id && this.number == other.number && this.name == other.name && this.dateCreated == other.dateCreated && this.dateUpdated == other.dateUpdated && this.description == other.description && this.evaluationWindow == other.evaluationWindow && this.delayWindow == other.delayWindow && this.type == other.type && this.subtype == other.subtype && this.creatorId == other.creatorId && this.originProjectVersionId == other.originProjectVersionId && this.thresholds == other.thresholds && this.archived == other.archived && this.dateArchived == other.dateArchived && this.suggested == other.suggested && this.commentCount == other.commentCount && this.usesMlModel == other.usesMlModel && this.usesValidationDataset == other.usesValidationDataset && this.usesTrainingDataset == other.usesTrainingDataset && this.usesReferenceDataset == other.usesReferenceDataset && this.usesProductionData == other.usesProductionData && this.additionalProperties == other.additionalProperties /* spotless:on */
1316+
return /* spotless:off */ other is Goal && id == other.id && number == other.number && name == other.name && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && description == other.description && evaluationWindow == other.evaluationWindow && delayWindow == other.delayWindow && type == other.type && subtype == other.subtype && creatorId == other.creatorId && originProjectVersionId == other.originProjectVersionId && thresholds == other.thresholds && archived == other.archived && dateArchived == other.dateArchived && suggested == other.suggested && commentCount == other.commentCount && usesMlModel == other.usesMlModel && usesValidationDataset == other.usesValidationDataset && usesTrainingDataset == other.usesTrainingDataset && usesReferenceDataset == other.usesReferenceDataset && usesProductionData == other.usesProductionData && additionalProperties == other.additionalProperties /* spotless:on */
13231317
}
13241318

1325-
private var hashCode: Int = 0
1319+
/* spotless:off */
1320+
private val hashCode: Int by lazy { Objects.hash(id, number, name, dateCreated, dateUpdated, description, evaluationWindow, delayWindow, type, subtype, creatorId, originProjectVersionId, thresholds, archived, dateArchived, suggested, commentCount, usesMlModel, usesValidationDataset, usesTrainingDataset, usesReferenceDataset, usesProductionData, additionalProperties) }
1321+
/* spotless:on */
13261322

1327-
override fun hashCode(): Int {
1328-
if (hashCode == 0) {
1329-
hashCode = /* spotless:off */ Objects.hash(id, number, name, dateCreated, dateUpdated, description, evaluationWindow, delayWindow, type, subtype, creatorId, originProjectVersionId, thresholds, archived, dateArchived, suggested, commentCount, usesMlModel, usesValidationDataset, usesTrainingDataset, usesReferenceDataset, usesProductionData, additionalProperties) /* spotless:on */
1330-
}
1331-
return hashCode
1332-
}
1323+
override fun hashCode(): Int = hashCode
13331324

13341325
override fun toString() =
13351326
"Goal{id=$id, number=$number, name=$name, dateCreated=$dateCreated, dateUpdated=$dateUpdated, description=$description, evaluationWindow=$evaluationWindow, delayWindow=$delayWindow, type=$type, subtype=$subtype, creatorId=$creatorId, originProjectVersionId=$originProjectVersionId, thresholds=$thresholds, archived=$archived, dateArchived=$dateArchived, suggested=$suggested, commentCount=$commentCount, usesMlModel=$usesMlModel, usesValidationDataset=$usesValidationDataset, usesTrainingDataset=$usesTrainingDataset, usesReferenceDataset=$usesReferenceDataset, usesProductionData=$usesProductionData, additionalProperties=$additionalProperties}"
@@ -1340,17 +1331,14 @@ private constructor(
13401331
return true
13411332
}
13421333

1343-
return /* spotless:off */ other is Item && this.id == other.id && this.goal == other.goal && this.goalId == other.goalId && this.projectVersionId == other.projectVersionId && this.inferencePipelineId == other.inferencePipelineId && this.dateCreated == other.dateCreated && this.dateUpdated == other.dateUpdated && this.dateDataStarts == other.dateDataStarts && this.dateDataEnds == other.dateDataEnds && this.status == other.status && this.statusMessage == other.statusMessage && this.additionalProperties == other.additionalProperties /* spotless:on */
1334+
return /* spotless:off */ other is Item && id == other.id && goal == other.goal && goalId == other.goalId && projectVersionId == other.projectVersionId && inferencePipelineId == other.inferencePipelineId && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && dateDataStarts == other.dateDataStarts && dateDataEnds == other.dateDataEnds && status == other.status && statusMessage == other.statusMessage && additionalProperties == other.additionalProperties /* spotless:on */
13441335
}
13451336

1346-
private var hashCode: Int = 0
1337+
/* spotless:off */
1338+
private val hashCode: Int by lazy { Objects.hash(id, goal, goalId, projectVersionId, inferencePipelineId, dateCreated, dateUpdated, dateDataStarts, dateDataEnds, status, statusMessage, additionalProperties) }
1339+
/* spotless:on */
13471340

1348-
override fun hashCode(): Int {
1349-
if (hashCode == 0) {
1350-
hashCode = /* spotless:off */ Objects.hash(id, goal, goalId, projectVersionId, inferencePipelineId, dateCreated, dateUpdated, dateDataStarts, dateDataEnds, status, statusMessage, additionalProperties) /* spotless:on */
1351-
}
1352-
return hashCode
1353-
}
1341+
override fun hashCode(): Int = hashCode
13541342

13551343
override fun toString() =
13561344
"Item{id=$id, goal=$goal, goalId=$goalId, projectVersionId=$projectVersionId, inferencePipelineId=$inferencePipelineId, dateCreated=$dateCreated, dateUpdated=$dateUpdated, dateDataStarts=$dateDataStarts, dateDataEnds=$dateDataEnds, status=$status, statusMessage=$statusMessage, additionalProperties=$additionalProperties}"
@@ -1361,17 +1349,14 @@ private constructor(
13611349
return true
13621350
}
13631351

1364-
return /* spotless:off */ other is CommitTestResultListResponse && this.items == other.items && this.additionalProperties == other.additionalProperties /* spotless:on */
1352+
return /* spotless:off */ other is CommitTestResultListResponse && items == other.items && additionalProperties == other.additionalProperties /* spotless:on */
13651353
}
13661354

1367-
private var hashCode: Int = 0
1355+
/* spotless:off */
1356+
private val hashCode: Int by lazy { Objects.hash(items, additionalProperties) }
1357+
/* spotless:on */
13681358

1369-
override fun hashCode(): Int {
1370-
if (hashCode == 0) {
1371-
hashCode = /* spotless:off */ Objects.hash(items, additionalProperties) /* spotless:on */
1372-
}
1373-
return hashCode
1374-
}
1359+
override fun hashCode(): Int = hashCode
13751360

13761361
override fun toString() =
13771362
"CommitTestResultListResponse{items=$items, additionalProperties=$additionalProperties}"

0 commit comments

Comments
 (0)