Skip to content

Commit

Permalink
style(internal): move enum identity methods to bottom of class (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Dec 11, 2024
1 parent bfbee37 commit c5cabdd
Show file tree
Hide file tree
Showing 117 changed files with 3,566 additions and 3,566 deletions.
24 changes: 12 additions & 12 deletions lithic-kotlin-core/src/main/kotlin/com/lithic/api/models/Account.kt
Original file line number Diff line number Diff line change
Expand Up @@ -477,18 +477,6 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is State && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

val ACTIVE = of("ACTIVE")
Expand Down Expand Up @@ -530,6 +518,18 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is State && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

@JsonDeserialize(builder = AccountHolder.Builder::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is AccountFinancialAccountType && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

val ISSUING = of("ISSUING")
Expand Down Expand Up @@ -63,4 +51,16 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is AccountFinancialAccountType && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}
Original file line number Diff line number Diff line change
Expand Up @@ -1202,18 +1202,6 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is ExemptionType && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

val AUTHORIZED_USER = of("AUTHORIZED_USER")
Expand Down Expand Up @@ -1249,27 +1237,27 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()
}

class Status
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is Status && value == other.value /* spotless:on */
return /* spotless:off */ other is ExemptionType && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

class Status
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

Expand Down Expand Up @@ -1324,27 +1312,27 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()
}

class StatusReason
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is StatusReason && value == other.value /* spotless:on */
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

class StatusReason
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

Expand Down Expand Up @@ -1435,27 +1423,27 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()
}

class UserType
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is UserType && value == other.value /* spotless:on */
return /* spotless:off */ other is StatusReason && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

class UserType
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

Expand Down Expand Up @@ -1492,6 +1480,18 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is UserType && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

/** Information about the most recent identity verification attempt */
Expand Down Expand Up @@ -1666,18 +1666,6 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

val ACCEPTED = of("ACCEPTED")
Expand Down Expand Up @@ -1731,27 +1719,27 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()
}

class StatusReason
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is StatusReason && value == other.value /* spotless:on */
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

class StatusReason
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

Expand Down Expand Up @@ -1842,6 +1830,18 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is StatusReason && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

override fun equals(other: Any?): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,18 +274,6 @@ private constructor(

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()

companion object {

val ACCEPTED = of("ACCEPTED")
Expand Down Expand Up @@ -339,27 +327,27 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()
}

class StatusReasons
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is StatusReasons && value == other.value /* spotless:on */
return /* spotless:off */ other is Status && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

class StatusReasons
@JsonCreator
private constructor(
private val value: JsonField<String>,
) : Enum {

@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField<String> = value

companion object {

Expand Down Expand Up @@ -564,6 +552,18 @@ private constructor(
}

fun asString(): String = _value().asStringOrThrow()

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is StatusReasons && value == other.value /* spotless:on */
}

override fun hashCode() = value.hashCode()

override fun toString() = value.toString()
}

override fun equals(other: Any?): Boolean {
Expand Down
Loading

0 comments on commit c5cabdd

Please sign in to comment.