Skip to content

Commit fd2661b

Browse files
chore(internal): format identity methods
1 parent e68d31e commit fd2661b

File tree

576 files changed

+11545
-4533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

576 files changed

+11545
-4533
lines changed

openai-java-core/src/main/kotlin/com/openai/core/Timeout.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,14 @@ private constructor(
157157
return true
158158
}
159159

160-
return /* spotless:off */ other is Timeout && connect == other.connect && read == other.read && write == other.write && request == other.request /* spotless:on */
160+
return other is Timeout &&
161+
connect == other.connect &&
162+
read == other.read &&
163+
write == other.write &&
164+
request == other.request
161165
}
162166

163-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(connect, read, write, request) /* spotless:on */
167+
override fun hashCode(): Int = Objects.hash(connect, read, write, request)
164168

165169
override fun toString() =
166170
"Timeout{connect=$connect, read=$read, write=$write, request=$request}"

openai-java-core/src/main/kotlin/com/openai/models/AllModels.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,13 @@ private constructor(
116116
return true
117117
}
118118

119-
return /* spotless:off */ other is AllModels && string == other.string && chatModel == other.chatModel && responsesOnlyModel == other.responsesOnlyModel /* spotless:on */
119+
return other is AllModels &&
120+
string == other.string &&
121+
chatModel == other.chatModel &&
122+
responsesOnlyModel == other.responsesOnlyModel
120123
}
121124

122-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(string, chatModel, responsesOnlyModel) /* spotless:on */
125+
override fun hashCode(): Int = Objects.hash(string, chatModel, responsesOnlyModel)
123126

124127
override fun toString(): String =
125128
when {
@@ -383,7 +386,7 @@ private constructor(
383386
return true
384387
}
385388

386-
return /* spotless:off */ other is ResponsesOnlyModel && value == other.value /* spotless:on */
389+
return other is ResponsesOnlyModel && value == other.value
387390
}
388391

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

openai-java-core/src/main/kotlin/com/openai/models/ChatModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
483483
return true
484484
}
485485

486-
return /* spotless:off */ other is ChatModel && value == other.value /* spotless:on */
486+
return other is ChatModel && value == other.value
487487
}
488488

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

openai-java-core/src/main/kotlin/com/openai/models/ComparisonFilter.kt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ private constructor(
419419
return true
420420
}
421421

422-
return /* spotless:off */ other is Type && value == other.value /* spotless:on */
422+
return other is Type && value == other.value
423423
}
424424

425425
override fun hashCode() = value.hashCode()
@@ -520,10 +520,13 @@ private constructor(
520520
return true
521521
}
522522

523-
return /* spotless:off */ other is Value && string == other.string && number == other.number && bool == other.bool /* spotless:on */
523+
return other is Value &&
524+
string == other.string &&
525+
number == other.number &&
526+
bool == other.bool
524527
}
525528

526-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(string, number, bool) /* spotless:on */
529+
override fun hashCode(): Int = Objects.hash(string, number, bool)
527530

528531
override fun toString(): String =
529532
when {
@@ -623,12 +626,14 @@ private constructor(
623626
return true
624627
}
625628

626-
return /* spotless:off */ other is ComparisonFilter && key == other.key && type == other.type && value == other.value && additionalProperties == other.additionalProperties /* spotless:on */
629+
return other is ComparisonFilter &&
630+
key == other.key &&
631+
type == other.type &&
632+
value == other.value &&
633+
additionalProperties == other.additionalProperties
627634
}
628635

629-
/* spotless:off */
630636
private val hashCode: Int by lazy { Objects.hash(key, type, value, additionalProperties) }
631-
/* spotless:on */
632637

633638
override fun hashCode(): Int = hashCode
634639

openai-java-core/src/main/kotlin/com/openai/models/CompoundFilter.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ private constructor(
323323
return true
324324
}
325325

326-
return /* spotless:off */ other is Filter && comparison == other.comparison && jsonValue == other.jsonValue /* spotless:on */
326+
return other is Filter && comparison == other.comparison && jsonValue == other.jsonValue
327327
}
328328

329-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(comparison, jsonValue) /* spotless:on */
329+
override fun hashCode(): Int = Objects.hash(comparison, jsonValue)
330330

331331
override fun toString(): String =
332332
when {
@@ -539,7 +539,7 @@ private constructor(
539539
return true
540540
}
541541

542-
return /* spotless:off */ other is Type && value == other.value /* spotless:on */
542+
return other is Type && value == other.value
543543
}
544544

545545
override fun hashCode() = value.hashCode()
@@ -552,12 +552,13 @@ private constructor(
552552
return true
553553
}
554554

555-
return /* spotless:off */ other is CompoundFilter && filters == other.filters && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */
555+
return other is CompoundFilter &&
556+
filters == other.filters &&
557+
type == other.type &&
558+
additionalProperties == other.additionalProperties
556559
}
557560

558-
/* spotless:off */
559561
private val hashCode: Int by lazy { Objects.hash(filters, type, additionalProperties) }
560-
/* spotless:on */
561562

562563
override fun hashCode(): Int = hashCode
563564

openai-java-core/src/main/kotlin/com/openai/models/CustomToolInputFormat.kt

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ private constructor(
119119
return true
120120
}
121121

122-
return /* spotless:off */ other is CustomToolInputFormat && text == other.text && grammar == other.grammar /* spotless:on */
122+
return other is CustomToolInputFormat && text == other.text && grammar == other.grammar
123123
}
124124

125-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(text, grammar) /* spotless:on */
125+
override fun hashCode(): Int = Objects.hash(text, grammar)
126126

127127
override fun toString(): String =
128128
when {
@@ -553,7 +553,7 @@ private constructor(
553553
return true
554554
}
555555

556-
return /* spotless:off */ other is Syntax && value == other.value /* spotless:on */
556+
return other is Syntax && value == other.value
557557
}
558558

559559
override fun hashCode() = value.hashCode()
@@ -566,12 +566,16 @@ private constructor(
566566
return true
567567
}
568568

569-
return /* spotless:off */ other is Grammar && definition == other.definition && syntax == other.syntax && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */
569+
return other is Grammar &&
570+
definition == other.definition &&
571+
syntax == other.syntax &&
572+
type == other.type &&
573+
additionalProperties == other.additionalProperties
570574
}
571575

572-
/* spotless:off */
573-
private val hashCode: Int by lazy { Objects.hash(definition, syntax, type, additionalProperties) }
574-
/* spotless:on */
576+
private val hashCode: Int by lazy {
577+
Objects.hash(definition, syntax, type, additionalProperties)
578+
}
575579

576580
override fun hashCode(): Int = hashCode
577581

openai-java-core/src/main/kotlin/com/openai/models/ErrorObject.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,17 @@ private constructor(
261261
return true
262262
}
263263

264-
return /* spotless:off */ other is ErrorObject && code == other.code && message == other.message && param == other.param && type == other.type && additionalProperties == other.additionalProperties /* spotless:on */
264+
return other is ErrorObject &&
265+
code == other.code &&
266+
message == other.message &&
267+
param == other.param &&
268+
type == other.type &&
269+
additionalProperties == other.additionalProperties
265270
}
266271

267-
/* spotless:off */
268-
private val hashCode: Int by lazy { Objects.hash(code, message, param, type, additionalProperties) }
269-
/* spotless:on */
272+
private val hashCode: Int by lazy {
273+
Objects.hash(code, message, param, type, additionalProperties)
274+
}
270275

271276
override fun hashCode(): Int = hashCode
272277

openai-java-core/src/main/kotlin/com/openai/models/FunctionDefinition.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,17 @@ private constructor(
310310
return true
311311
}
312312

313-
return /* spotless:off */ other is FunctionDefinition && name == other.name && description == other.description && parameters == other.parameters && strict == other.strict && additionalProperties == other.additionalProperties /* spotless:on */
313+
return other is FunctionDefinition &&
314+
name == other.name &&
315+
description == other.description &&
316+
parameters == other.parameters &&
317+
strict == other.strict &&
318+
additionalProperties == other.additionalProperties
314319
}
315320

316-
/* spotless:off */
317-
private val hashCode: Int by lazy { Objects.hash(name, description, parameters, strict, additionalProperties) }
318-
/* spotless:on */
321+
private val hashCode: Int by lazy {
322+
Objects.hash(name, description, parameters, strict, additionalProperties)
323+
}
319324

320325
override fun hashCode(): Int = hashCode
321326

openai-java-core/src/main/kotlin/com/openai/models/FunctionParameters.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,10 @@ private constructor(
106106
return true
107107
}
108108

109-
return /* spotless:off */ other is FunctionParameters && additionalProperties == other.additionalProperties /* spotless:on */
109+
return other is FunctionParameters && additionalProperties == other.additionalProperties
110110
}
111111

112-
/* spotless:off */
113112
private val hashCode: Int by lazy { Objects.hash(additionalProperties) }
114-
/* spotless:on */
115113

116114
override fun hashCode(): Int = hashCode
117115

openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ private constructor(
390390
return true
391391
}
392392

393-
return /* spotless:off */ other is GenerateSummary && value == other.value /* spotless:on */
393+
return other is GenerateSummary && value == other.value
394394
}
395395

396396
override fun hashCode() = value.hashCode()
@@ -525,7 +525,7 @@ private constructor(
525525
return true
526526
}
527527

528-
return /* spotless:off */ other is Summary && value == other.value /* spotless:on */
528+
return other is Summary && value == other.value
529529
}
530530

531531
override fun hashCode() = value.hashCode()
@@ -538,12 +538,16 @@ private constructor(
538538
return true
539539
}
540540

541-
return /* spotless:off */ other is Reasoning && effort == other.effort && generateSummary == other.generateSummary && summary == other.summary && additionalProperties == other.additionalProperties /* spotless:on */
541+
return other is Reasoning &&
542+
effort == other.effort &&
543+
generateSummary == other.generateSummary &&
544+
summary == other.summary &&
545+
additionalProperties == other.additionalProperties
542546
}
543547

544-
/* spotless:off */
545-
private val hashCode: Int by lazy { Objects.hash(effort, generateSummary, summary, additionalProperties) }
546-
/* spotless:on */
548+
private val hashCode: Int by lazy {
549+
Objects.hash(effort, generateSummary, summary, additionalProperties)
550+
}
547551

548552
override fun hashCode(): Int = hashCode
549553

0 commit comments

Comments
 (0)