Skip to content

Commit 5bea959

Browse files
fix(client): escape keywords reserved in java, but not in kotlin, for the java sdk (#323)
1 parent 1b459c3 commit 5bea959

11 files changed

Lines changed: 273 additions & 273 deletions

lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleMigrateV1ToV2Response.kt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ private constructor(
852852
class Value
853853
private constructor(
854854
private val string: String? = null,
855-
private val double: Double? = null,
855+
private val double_: Double? = null,
856856
private val strings: List<String>? = null,
857857
private val _json: JsonValue? = null,
858858
) {
@@ -862,19 +862,19 @@ private constructor(
862862
/** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
863863
fun string(): Optional<String> = Optional.ofNullable(string)
864864
/** A number, to be used with `IS_GREATER_THAN` or `IS_LESS_THAN` */
865-
fun double(): Optional<Double> = Optional.ofNullable(double)
865+
fun double_(): Optional<Double> = Optional.ofNullable(double_)
866866
/** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */
867867
fun strings(): Optional<List<String>> = Optional.ofNullable(strings)
868868

869869
fun isString(): Boolean = string != null
870870

871-
fun isDouble(): Boolean = double != null
871+
fun isDouble(): Boolean = double_ != null
872872

873873
fun isStrings(): Boolean = strings != null
874874

875875
fun asString(): String = string.getOrThrow("string")
876876

877-
fun asDouble(): Double = double.getOrThrow("double")
877+
fun asDouble(): Double = double_.getOrThrow("double_")
878878

879879
fun asStrings(): List<String> = strings.getOrThrow("strings")
880880

@@ -883,15 +883,15 @@ private constructor(
883883
fun <T> accept(visitor: Visitor<T>): T {
884884
return when {
885885
string != null -> visitor.visitString(string)
886-
double != null -> visitor.visitDouble(double)
886+
double_ != null -> visitor.visitDouble(double_)
887887
strings != null -> visitor.visitStrings(strings)
888888
else -> visitor.unknown(_json)
889889
}
890890
}
891891

892892
fun validate(): Value = apply {
893893
if (!validated) {
894-
if (string == null && double == null && strings == null) {
894+
if (string == null && double_ == null && strings == null) {
895895
throw LithicInvalidDataException("Unknown Value: $_json")
896896
}
897897
validated = true
@@ -905,22 +905,22 @@ private constructor(
905905

906906
return other is Value &&
907907
this.string == other.string &&
908-
this.double == other.double &&
908+
this.double_ == other.double_ &&
909909
this.strings == other.strings
910910
}
911911

912912
override fun hashCode(): Int {
913913
return Objects.hash(
914914
string,
915-
double,
915+
double_,
916916
strings,
917917
)
918918
}
919919

920920
override fun toString(): String {
921921
return when {
922922
string != null -> "Value{string=$string}"
923-
double != null -> "Value{double=$double}"
923+
double_ != null -> "Value{double_=$double_}"
924924
strings != null -> "Value{strings=$strings}"
925925
_json != null -> "Value{_unknown=$_json}"
926926
else -> throw IllegalStateException("Invalid Value")
@@ -931,7 +931,7 @@ private constructor(
931931

932932
@JvmStatic fun ofString(string: String) = Value(string = string)
933933

934-
@JvmStatic fun ofDouble(double: Double) = Value(double = double)
934+
@JvmStatic fun ofDouble(double_: Double) = Value(double_ = double_)
935935

936936
@JvmStatic
937937
fun ofStrings(strings: List<String>) = Value(strings = strings)
@@ -941,7 +941,7 @@ private constructor(
941941

942942
fun visitString(string: String): T
943943

944-
fun visitDouble(double: Double): T
944+
fun visitDouble(double_: Double): T
945945

946946
fun visitStrings(strings: List<String>): T
947947

@@ -958,7 +958,7 @@ private constructor(
958958
return Value(string = it, _json = json)
959959
}
960960
tryDeserialize(node, jacksonTypeRef<Double>())?.let {
961-
return Value(double = it, _json = json)
961+
return Value(double_ = it, _json = json)
962962
}
963963
tryDeserialize(node, jacksonTypeRef<List<String>>())?.let {
964964
return Value(strings = it, _json = json)
@@ -977,7 +977,7 @@ private constructor(
977977
) {
978978
when {
979979
value.string != null -> generator.writeObject(value.string)
980-
value.double != null -> generator.writeObject(value.double)
980+
value.double_ != null -> generator.writeObject(value.double_)
981981
value.strings != null -> generator.writeObject(value.strings)
982982
value._json != null -> generator.writeObject(value._json)
983983
else -> throw IllegalStateException("Invalid Value")
@@ -1689,7 +1689,7 @@ private constructor(
16891689
class Value
16901690
private constructor(
16911691
private val string: String? = null,
1692-
private val double: Double? = null,
1692+
private val double_: Double? = null,
16931693
private val strings: List<String>? = null,
16941694
private val _json: JsonValue? = null,
16951695
) {
@@ -1699,19 +1699,19 @@ private constructor(
16991699
/** A regex string, to be used with `MATCHES` or `DOES_NOT_MATCH` */
17001700
fun string(): Optional<String> = Optional.ofNullable(string)
17011701
/** A number, to be used with `IS_GREATER_THAN` or `IS_LESS_THAN` */
1702-
fun double(): Optional<Double> = Optional.ofNullable(double)
1702+
fun double_(): Optional<Double> = Optional.ofNullable(double_)
17031703
/** An array of strings, to be used with `IS_ONE_OF` or `IS_NOT_ONE_OF` */
17041704
fun strings(): Optional<List<String>> = Optional.ofNullable(strings)
17051705

17061706
fun isString(): Boolean = string != null
17071707

1708-
fun isDouble(): Boolean = double != null
1708+
fun isDouble(): Boolean = double_ != null
17091709

17101710
fun isStrings(): Boolean = strings != null
17111711

17121712
fun asString(): String = string.getOrThrow("string")
17131713

1714-
fun asDouble(): Double = double.getOrThrow("double")
1714+
fun asDouble(): Double = double_.getOrThrow("double_")
17151715

17161716
fun asStrings(): List<String> = strings.getOrThrow("strings")
17171717

@@ -1720,15 +1720,15 @@ private constructor(
17201720
fun <T> accept(visitor: Visitor<T>): T {
17211721
return when {
17221722
string != null -> visitor.visitString(string)
1723-
double != null -> visitor.visitDouble(double)
1723+
double_ != null -> visitor.visitDouble(double_)
17241724
strings != null -> visitor.visitStrings(strings)
17251725
else -> visitor.unknown(_json)
17261726
}
17271727
}
17281728

17291729
fun validate(): Value = apply {
17301730
if (!validated) {
1731-
if (string == null && double == null && strings == null) {
1731+
if (string == null && double_ == null && strings == null) {
17321732
throw LithicInvalidDataException("Unknown Value: $_json")
17331733
}
17341734
validated = true
@@ -1742,22 +1742,22 @@ private constructor(
17421742

17431743
return other is Value &&
17441744
this.string == other.string &&
1745-
this.double == other.double &&
1745+
this.double_ == other.double_ &&
17461746
this.strings == other.strings
17471747
}
17481748

17491749
override fun hashCode(): Int {
17501750
return Objects.hash(
17511751
string,
1752-
double,
1752+
double_,
17531753
strings,
17541754
)
17551755
}
17561756

17571757
override fun toString(): String {
17581758
return when {
17591759
string != null -> "Value{string=$string}"
1760-
double != null -> "Value{double=$double}"
1760+
double_ != null -> "Value{double_=$double_}"
17611761
strings != null -> "Value{strings=$strings}"
17621762
_json != null -> "Value{_unknown=$_json}"
17631763
else -> throw IllegalStateException("Invalid Value")
@@ -1768,7 +1768,7 @@ private constructor(
17681768

17691769
@JvmStatic fun ofString(string: String) = Value(string = string)
17701770

1771-
@JvmStatic fun ofDouble(double: Double) = Value(double = double)
1771+
@JvmStatic fun ofDouble(double_: Double) = Value(double_ = double_)
17721772

17731773
@JvmStatic
17741774
fun ofStrings(strings: List<String>) = Value(strings = strings)
@@ -1778,7 +1778,7 @@ private constructor(
17781778

17791779
fun visitString(string: String): T
17801780

1781-
fun visitDouble(double: Double): T
1781+
fun visitDouble(double_: Double): T
17821782

17831783
fun visitStrings(strings: List<String>): T
17841784

@@ -1795,7 +1795,7 @@ private constructor(
17951795
return Value(string = it, _json = json)
17961796
}
17971797
tryDeserialize(node, jacksonTypeRef<Double>())?.let {
1798-
return Value(double = it, _json = json)
1798+
return Value(double_ = it, _json = json)
17991799
}
18001800
tryDeserialize(node, jacksonTypeRef<List<String>>())?.let {
18011801
return Value(strings = it, _json = json)
@@ -1814,7 +1814,7 @@ private constructor(
18141814
) {
18151815
when {
18161816
value.string != null -> generator.writeObject(value.string)
1817-
value.double != null -> generator.writeObject(value.double)
1817+
value.double_ != null -> generator.writeObject(value.double_)
18181818
value.strings != null -> generator.writeObject(value.strings)
18191819
value._json != null -> generator.writeObject(value._json)
18201820
else -> throw IllegalStateException("Invalid Value")

0 commit comments

Comments
 (0)