diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt index 0d82a1a48..198f0342c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Account.kt @@ -618,7 +618,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountFinancialAccountType.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountFinancialAccountType.kt index c51a448cd..4a0ccc8e8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountFinancialAccountType.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountFinancialAccountType.kt @@ -86,7 +86,17 @@ private constructor(private val value: JsonField) : Enum { else -> throw LithicInvalidDataException("Unknown AccountFinancialAccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt index 1b5c41d06..64cf595a4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolder.kt @@ -1430,7 +1430,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExemptionType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1544,7 +1554,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1689,7 +1709,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatusReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1783,7 +1813,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown UserType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2084,7 +2124,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2230,7 +2282,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatusReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt index 07f593705..10b4bcf55 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderCreateResponse.kt @@ -402,7 +402,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -676,7 +686,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatusReasons: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt index 66efa8f3f..697108358 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentDocumentReviewParams.kt @@ -572,7 +572,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -727,7 +737,17 @@ private constructor( throw LithicInvalidDataException("Unknown DocumentUploadStatusReasons: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt index e67f1b8ee..fd58a4abf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewParams.kt @@ -517,7 +517,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -763,7 +773,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatusReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt index dc9438ff4..ef6a0c006 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderSimulateEnrollmentReviewResponse.kt @@ -1972,7 +1972,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExemptionType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2080,7 +2090,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2354,7 +2374,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatusReasons: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2451,7 +2481,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown UserType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2739,7 +2779,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3016,7 +3068,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatusReasons: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt index 65468eea3..22ec5298b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountHolderUploadDocumentParams.kt @@ -557,7 +557,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DocumentType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt index de30d6ac3..3785493a8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AccountUpdateParams.kt @@ -705,7 +705,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt index e88c43eb9..5eabe7276 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalance.kt @@ -426,7 +426,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt index 800c9e8a9..071b5b672 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AggregateBalanceListParams.kt @@ -263,7 +263,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt index b7d1efe87..90a22cc37 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRule.kt @@ -494,7 +494,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt index f1f20cafc..320c890ff 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleCondition.kt @@ -376,7 +376,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Operation: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt index e89de8df0..9753bec1b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2CreateParams.kt @@ -674,7 +674,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1126,7 +1138,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1605,7 +1629,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt index fce8e3d5f..93c69e77a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthRuleV2UpdateParams.kt @@ -475,7 +475,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -756,7 +768,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1063,7 +1087,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt index 6c9d87b08..678cd7b49 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/AuthenticationRetrieveResponse.kt @@ -842,7 +842,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -949,7 +959,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthenticationResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1051,7 +1071,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown CardExpiryCheck: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1771,7 +1801,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Channel: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2585,7 +2625,19 @@ private constructor( throw LithicInvalidDataException("Unknown DeliveryTimeFrame: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2685,7 +2737,19 @@ private constructor( throw LithicInvalidDataException("Unknown OrderAvailability: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2783,7 +2847,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ReorderItems: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2927,7 +3003,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3059,7 +3147,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown MessageCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3200,7 +3298,17 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3462,7 +3570,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown NetworkDecision: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3780,7 +3900,17 @@ private constructor( throw LithicInvalidDataException("Unknown AuthenticationRequestType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4312,7 +4442,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown MethodType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4432,7 +4574,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ChallengeOrchestratedBy: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4543,7 +4695,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DecisionMadeBy: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4726,7 +4888,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ThreeRiRequestType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -5058,7 +5230,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt index 2d004031b..0fc227a56 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Balance.kt @@ -430,7 +430,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt index 6707decab..3aefe190e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListParams.kt @@ -318,7 +318,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt index 5ad270b9e..d040d4e85 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BalanceListResponse.kt @@ -408,7 +408,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt index 0de56b5f8..f465b3f67 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferCreateParams.kt @@ -737,7 +737,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1006,7 +1016,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt index af52cc969..38b02d199 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferListParams.kt @@ -475,7 +475,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -564,7 +574,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -653,7 +673,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt index 9675814b6..0d9e2a87b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/BookTransferResponse.kt @@ -523,7 +523,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -876,7 +886,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DetailedResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -970,7 +992,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1080,7 +1114,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1178,7 +1222,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt index 59bb55718..f83e68718 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt @@ -1253,7 +1253,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1346,7 +1358,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1463,7 +1487,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown PinStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1586,7 +1620,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1712,7 +1756,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt index b0e530217..ca2ff8a5a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardConvertPhysicalParams.kt @@ -661,7 +661,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt index 933d24dfa..095ca72ff 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardCreateParams.kt @@ -1636,7 +1636,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1762,7 +1772,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1855,7 +1875,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt index b693b4ece..1b42e8c95 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardFinancialTransactionListParams.kt @@ -390,7 +390,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -479,7 +489,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -592,7 +612,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt index 26091c3cd..c8a23105f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardListParams.kt @@ -394,7 +394,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt index 6bb8ef4f3..44b86fdc0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardProvisionParams.kt @@ -742,7 +742,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DigitalWallet: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt index 72e91fe35..1f4e93b1e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardReissueParams.kt @@ -658,7 +658,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt index e1455ea78..bebea1e37 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardRenewParams.kt @@ -768,7 +768,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ShippingMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt index 774ac1784..9e3c2bdec 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/CardUpdateParams.kt @@ -876,7 +876,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown PinStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -976,7 +986,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt index 5bb55caf5..aa9ad2e97 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ChallengeResult.kt @@ -82,7 +82,17 @@ class ChallengeResult @JsonCreator private constructor(private val value: JsonFi else -> throw LithicInvalidDataException("Unknown ChallengeResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAttribute.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAttribute.kt index edb2eee0d..248631e25 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAttribute.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ConditionalAttribute.kt @@ -165,7 +165,17 @@ class ConditionalAttribute @JsonCreator private constructor(private val value: J else -> throw LithicInvalidDataException("Unknown ConditionalAttribute: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Currency.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Currency.kt index b6577346e..d83d797c0 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Currency.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Currency.kt @@ -1156,7 +1156,17 @@ class Currency @JsonCreator private constructor(private val value: JsonField throw LithicInvalidDataException("Unknown Currency: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt index c2bc7cd8e..1e5a46c19 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DigitalCardArt.kt @@ -299,7 +299,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Network: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Dispute.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Dispute.kt index 9900a0f0a..ecdc4c781 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Dispute.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Dispute.kt @@ -983,7 +983,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Reason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1187,7 +1197,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ResolutionReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1322,7 +1342,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt index 189a13d40..5f3dacfdd 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeCreateParams.kt @@ -600,7 +600,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Reason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt index 1171310db..fd6e5e3a7 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeEvidence.kt @@ -366,7 +366,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown UploadStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt index 6fe7b908d..7ee2141f2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeListParams.kt @@ -424,7 +424,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt index b9ae8ffd3..5ee7fe37b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/DisputeUpdateParams.kt @@ -575,7 +575,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Reason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Document.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Document.kt index 83b582643..8c8744717 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Document.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Document.kt @@ -391,7 +391,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DocumentType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -848,7 +858,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ImageType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -962,7 +984,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DocumentUploadStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1119,7 +1153,19 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt index ca1382ac6..aeb16c0a9 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EnhancedData.kt @@ -757,7 +757,19 @@ private constructor( throw LithicInvalidDataException("Unknown TaxExemptIndicator: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2260,7 +2272,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FuelType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2387,7 +2411,19 @@ private constructor( throw LithicInvalidDataException("Unknown FuelUnitOfMeasure: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2516,7 +2552,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ServiceType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt index dcf5b568a..ec347a100 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Event.kt @@ -636,7 +636,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt index 1cd1120e9..a2eb334c5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListAttemptsParams.kt @@ -386,7 +386,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt index e045696b8..a9875c510 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventListParams.kt @@ -644,7 +644,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt index b1f4b5f08..1b8cd94c3 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscription.kt @@ -513,7 +513,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt index 0d21fe181..0b667af59 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionCreateParams.kt @@ -779,7 +779,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt index 1241f6810..6eb540c96 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionListAttemptsParams.kt @@ -391,7 +391,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt index 472da3f9c..4b0ead604 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionSendSimulatedExampleParams.kt @@ -651,7 +651,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt index e4f8571cf..919ca1351 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/EventSubscriptionUpdateParams.kt @@ -796,7 +796,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt index 6e5f17483..6686bb127 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateParams.kt @@ -861,7 +861,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1735,7 +1747,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1830,7 +1854,19 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt index eb718be9e..74d9b4244 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountCreateResponse.kt @@ -698,7 +698,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -793,7 +803,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -882,7 +902,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -988,7 +1018,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1093,7 +1133,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt index 66b4d8174..98b037604 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListParams.kt @@ -405,7 +405,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -502,7 +512,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AccountState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -606,7 +626,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt index 9d66308ba..a1b0ff601 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountListResponse.kt @@ -697,7 +697,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -792,7 +802,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -881,7 +901,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -987,7 +1017,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1092,7 +1132,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt index 578653e32..4d1b4ea37 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetrieveResponse.kt @@ -698,7 +698,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -793,7 +803,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -882,7 +902,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -988,7 +1018,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1093,7 +1133,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt index 4b4f582a0..49aecad9f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryMicroDepositsResponse.kt @@ -702,7 +702,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -797,7 +807,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -886,7 +906,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -992,7 +1022,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1097,7 +1137,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt index ca7d4aee1..6d312766f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountRetryPrenoteResponse.kt @@ -703,7 +703,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -792,7 +802,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -897,7 +917,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt index 204eabcf6..ac1f4e715 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateParams.kt @@ -693,7 +693,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AccountTypeExternal: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt index 27060c54c..d66d3ea69 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalBankAccountUpdateResponse.kt @@ -698,7 +698,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -793,7 +803,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -882,7 +902,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -988,7 +1018,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1093,7 +1133,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt index ee864b23b..6c36879b1 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPayment.kt @@ -414,7 +414,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExternalPaymentCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -710,7 +720,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DetailedResults: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -804,7 +826,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1008,7 +1042,19 @@ private constructor( throw LithicInvalidDataException("Unknown ExternalPaymentEventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1121,7 +1167,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExternalPaymentDirection: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1213,7 +1269,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1323,7 +1389,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt index 39368ef62..9fe414dd8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentCreateParams.kt @@ -621,7 +621,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExternalPaymentCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -716,7 +726,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExternalPaymentDirection: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -812,7 +832,17 @@ private constructor( throw LithicInvalidDataException("Unknown ExternalPaymentProgressTo: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt index 738fb05ad..ab7827773 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentListParams.kt @@ -453,7 +453,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ExternalPaymentCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -546,7 +556,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -657,7 +677,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt index 8d0bd5b88..67e6970e2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ExternalPaymentSettleParams.kt @@ -460,7 +460,17 @@ private constructor( throw LithicInvalidDataException("Unknown ExternalPaymentProgressTo: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt index 9551c8b5a..f855ce055 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccount.kt @@ -601,7 +601,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ChargedOffReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -710,7 +722,19 @@ private constructor( throw LithicInvalidDataException("Unknown FinancialAccountState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -822,7 +846,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt index 06fbc6551..7ca1db3d2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountChargeOffParams.kt @@ -398,7 +398,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ChargedOffReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt index 33ee4b439..ad4048e5f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreateParams.kt @@ -462,7 +462,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt index e72e8a69b..87a67c563 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountCreditConfig.kt @@ -350,7 +350,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ChargedOffReason: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -457,7 +467,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialAccountState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt index bbb4c038b..22eac6a63 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialAccountListParams.kt @@ -284,7 +284,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt index ec3d55503..1e6610a7f 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransaction.kt @@ -505,7 +505,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -779,7 +789,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1240,7 +1262,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialEventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1350,7 +1384,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1471,7 +1515,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt index 905d8e597..3611a4212 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/FinancialTransactionListParams.kt @@ -396,7 +396,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -485,7 +495,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -598,7 +618,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt index f99f95e02..5269586fa 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/InstanceFinancialAccountType.kt @@ -92,7 +92,17 @@ private constructor(private val value: JsonField) : Enum { else -> throw LithicInvalidDataException("Unknown InstanceFinancialAccountType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt index 6f093cc9e..790c99f1d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt @@ -1108,7 +1108,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Workflow: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyc.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyc.kt index c6e4900c6..c6d72978e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyc.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyc.kt @@ -565,7 +565,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Workflow: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/KycExempt.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/KycExempt.kt index b092d5d76..64d95d2ef 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/KycExempt.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/KycExempt.kt @@ -370,7 +370,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown KycExemptionType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -453,7 +463,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Workflow: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/LoanTape.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/LoanTape.kt index ea0a20563..e801a261a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/LoanTape.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/LoanTape.kt @@ -862,7 +862,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown PeriodState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1903,7 +1915,19 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt index 1302522a9..929aca1a4 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationCreateParams.kt @@ -643,7 +643,17 @@ private constructor( throw LithicInvalidDataException("Unknown ManagementOperationCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -739,7 +749,17 @@ private constructor( throw LithicInvalidDataException("Unknown ManagementOperationDirection: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -907,7 +927,17 @@ private constructor( throw LithicInvalidDataException("Unknown ManagementOperationEventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt index 6c64a32ff..6ff92451c 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationListParams.kt @@ -441,7 +441,17 @@ private constructor( throw LithicInvalidDataException("Unknown ManagementOperationCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -552,7 +562,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt index ca889fd65..c4637347b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ManagementOperationTransaction.kt @@ -415,7 +415,17 @@ private constructor( throw LithicInvalidDataException("Unknown ManagementOperationCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -511,7 +521,17 @@ private constructor( throw LithicInvalidDataException("Unknown ManagementOperationDirection: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -823,7 +843,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DetailedResults: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -917,7 +949,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1087,7 +1131,19 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1197,7 +1253,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1307,7 +1373,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionStatus: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MessageAttempt.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MessageAttempt.kt index 6b15e8851..dbf754d74 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MessageAttempt.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MessageAttempt.kt @@ -340,7 +340,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt index 41d717cac..97e5a17a9 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/MicroDepositCreateResponse.kt @@ -695,7 +695,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -790,7 +800,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown State: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -879,7 +899,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -985,7 +1015,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1090,7 +1130,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt index 15da2c277..d26be7e0e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/OwnerType.kt @@ -78,7 +78,17 @@ class OwnerType @JsonCreator private constructor(private val value: JsonField throw LithicInvalidDataException("Unknown OwnerType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt index ca204edf9..63ddf7974 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Payment.kt @@ -583,7 +583,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -673,7 +683,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Direction: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1063,7 +1083,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1230,7 +1262,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown PaymentEventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1348,7 +1392,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DetailedResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1454,7 +1510,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Method: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1747,7 +1813,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown SecCode: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1857,7 +1935,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1945,7 +2033,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Source: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2053,7 +2151,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt index 2ea750008..495a34f61 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentCreateParams.kt @@ -619,7 +619,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Method: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -797,7 +807,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown SecCode: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -903,7 +925,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt index 396e1cb8d..bdbcd94dd 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentListParams.kt @@ -417,7 +417,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -505,7 +515,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -605,7 +625,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt index 2fb76bf98..8e2f94206 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionParams.kt @@ -523,7 +523,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown SupportedSimulationTypes: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -630,7 +640,17 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionResponse.kt index 3accf1916..53d8f60fb 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateActionResponse.kt @@ -223,7 +223,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt index b65bc49cd..70c31719b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptParams.kt @@ -519,7 +519,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ReceiptType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptResponse.kt index 4668a2fd6..f1db4d7f2 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReceiptResponse.kt @@ -224,7 +224,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseResponse.kt index 26bdb2a3d..9c0c161db 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReleaseResponse.kt @@ -224,7 +224,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnResponse.kt index dd1d062a6..6618f0316 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/PaymentSimulateReturnResponse.kt @@ -223,7 +223,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt index 62a032362..ea6e8e266 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCheckStatusParams.kt @@ -250,7 +250,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt index 83b1e5bec..bc99e82b5 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointCreateParams.kt @@ -403,7 +403,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt index b51f308da..3a462ba90 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ResponderEndpointDeleteParams.kt @@ -284,7 +284,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt index 2b9d8f213..85078e825 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementDetail.kt @@ -681,7 +681,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Network: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -905,7 +915,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt index 9d39693d3..dd5c90a3e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SettlementSummaryDetails.kt @@ -382,7 +382,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Network: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SpendLimitDuration.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SpendLimitDuration.kt index c1893aac6..aa2c69060 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/SpendLimitDuration.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/SpendLimitDuration.kt @@ -105,7 +105,17 @@ class SpendLimitDuration @JsonCreator private constructor(private val value: Jso else -> throw LithicInvalidDataException("Unknown SpendLimitDuration: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt index 7f28f1dff..ca47e8f47 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Statement.kt @@ -855,7 +855,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown PeriodState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1337,7 +1349,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown StatementType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1798,7 +1820,19 @@ private constructor( ) } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt index fa05b88ad..09756bbcf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/StatementLineItems.kt @@ -580,7 +580,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TransactionCategory: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1041,7 +1053,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialEventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt index db35663a4..1f8e50d4d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/ThreeDSAuthenticationSimulateParams.kt @@ -823,7 +823,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown CardExpiryCheck: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt index 31470d415..e48751e93 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Tokenization.kt @@ -511,7 +511,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -659,7 +669,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TokenRequestorName: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -753,7 +773,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TokenizationChannel: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1042,7 +1072,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1149,7 +1191,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt index a2403cb57..f2002b534 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationListParams.kt @@ -396,7 +396,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TokenizationChannel: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt index 9b8f3cc55..26b89b70a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationResendActivationCodeParams.kt @@ -454,7 +454,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown ActivationMethodType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt index 0ee0f3685..772a7e85a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TokenizationSimulateParams.kt @@ -724,7 +724,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown TokenizationSource: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -828,7 +838,17 @@ private constructor( throw LithicInvalidDataException("Unknown WalletRecommendedDecision: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt index bbc8bcbab..d96e74acf 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transaction.kt @@ -2160,7 +2160,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AcquirerExemption: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2268,7 +2280,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthenticationResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2380,7 +2404,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DecisionMadeBy: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2495,7 +2531,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown LiabilityShift: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2595,7 +2643,19 @@ private constructor( throw LithicInvalidDataException("Unknown VerificationAttempted: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -2718,7 +2778,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown VerificationResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3106,7 +3178,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Network: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3459,7 +3541,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Card: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3601,7 +3695,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Cardholder: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -3771,7 +3877,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Pan: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4139,7 +4257,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Operator: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4246,7 +4376,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown PinCapability: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4470,7 +4612,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4724,7 +4878,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DeclineResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -4831,7 +4995,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -5060,7 +5234,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown WalletType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -6487,7 +6673,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DetailedResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -6582,7 +6780,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown EffectivePolarity: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -7654,7 +7864,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DeclineResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -8277,7 +8499,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown DetailedResult: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have + * the expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -8456,7 +8690,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt index ff93df5fc..139f6d25d 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionListParams.kt @@ -419,7 +419,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -534,7 +544,17 @@ private constructor( throw LithicInvalidDataException("Unknown CardTransactionStatusFilter: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt index 4892a0ecc..6673cc050 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateAuthorizationParams.kt @@ -987,7 +987,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt index 084b79c12..188ce7894 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/TransactionSimulateVoidParams.kt @@ -503,7 +503,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Type: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt index b0ec989e5..cda336c5a 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/Transfer.kt @@ -546,7 +546,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Category: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -820,7 +830,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1281,7 +1303,19 @@ private constructor( else -> throw LithicInvalidDataException("Unknown FinancialEventType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + LithicInvalidDataException("Value is not a String") + } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1391,7 +1425,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Result: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1505,7 +1549,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Status: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ApplyResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ApplyResponse.kt index a9dc111e0..2ccb2fabb 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ApplyResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ApplyResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2CreateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2CreateResponse.kt index 95506c46b..d8a615341 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2CreateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2CreateResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2DraftResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2DraftResponse.kt index 59e2675f9..1f1f8f6ee 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2DraftResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2DraftResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResponse.kt index 7368cc7da..8b1ea7adc 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2ListResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2PromoteResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2PromoteResponse.kt index e1a6d22bf..8f13b7de8 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2PromoteResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2PromoteResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2RetrieveResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2RetrieveResponse.kt index 2e4bc36c3..12a38bd5b 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2RetrieveResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2RetrieveResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2UpdateResponse.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2UpdateResponse.kt index 2d24ace16..f4b2f1e58 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2UpdateResponse.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/V2UpdateResponse.kt @@ -1013,7 +1013,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleState: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { @@ -1105,7 +1115,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown AuthRuleType: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParams.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParams.kt index fc8e27c27..ae4e0cf2e 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParams.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParams.kt @@ -733,7 +733,17 @@ private constructor( else -> throw LithicInvalidDataException("Unknown Scope: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging + * and generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParamsPeriodWindow.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParamsPeriodWindow.kt index 3b0bba978..571eb57b9 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParamsPeriodWindow.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VelocityLimitParamsPeriodWindow.kt @@ -92,7 +92,17 @@ private constructor(private val value: JsonField) : Enum { throw LithicInvalidDataException("Unknown VelocityLimitParamsPeriodWindow: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) { diff --git a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VerificationMethod.kt b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VerificationMethod.kt index 3168e06b7..09f53f751 100644 --- a/lithic-java-core/src/main/kotlin/com/lithic/api/models/VerificationMethod.kt +++ b/lithic-java-core/src/main/kotlin/com/lithic/api/models/VerificationMethod.kt @@ -100,7 +100,17 @@ class VerificationMethod @JsonCreator private constructor(private val value: Jso else -> throw LithicInvalidDataException("Unknown VerificationMethod: $value") } - fun asString(): String = _value().asStringOrThrow() + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for debugging and + * generally doesn't throw. + * + * @throws LithicInvalidDataException if this class instance's value does not have the expected + * primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { LithicInvalidDataException("Value is not a String") } override fun equals(other: Any?): Boolean { if (this === other) {