@@ -1188,7 +1188,6 @@ private constructor(
11881188 private val callbackUrl: JsonField <String >,
11891189 private val codeSize: JsonField <Long >,
11901190 private val customCode: JsonField <String >,
1191- private val integration: JsonField <Integration >,
11921191 private val locale: JsonField <String >,
11931192 private val method: JsonField <Method >,
11941193 private val preferredChannel: JsonField <PreferredChannel >,
@@ -1210,9 +1209,6 @@ private constructor(
12101209 @JsonProperty(" custom_code" )
12111210 @ExcludeMissing
12121211 customCode: JsonField <String > = JsonMissing .of(),
1213- @JsonProperty(" integration" )
1214- @ExcludeMissing
1215- integration: JsonField <Integration > = JsonMissing .of(),
12161212 @JsonProperty(" locale" ) @ExcludeMissing locale: JsonField <String > = JsonMissing .of(),
12171213 @JsonProperty(" method" ) @ExcludeMissing method: JsonField <Method > = JsonMissing .of(),
12181214 @JsonProperty(" preferred_channel" )
@@ -1232,7 +1228,6 @@ private constructor(
12321228 callbackUrl,
12331229 codeSize,
12341230 customCode,
1235- integration,
12361231 locale,
12371232 method,
12381233 preferredChannel,
@@ -1280,14 +1275,6 @@ private constructor(
12801275 */
12811276 fun customCode (): Optional <String > = customCode.getOptional(" custom_code" )
12821277
1283- /* *
1284- * The integration that triggered the verification.
1285- *
1286- * @throws PreludeInvalidDataException if the JSON field has an unexpected type (e.g. if the
1287- * server responded with an unexpected value).
1288- */
1289- fun integration (): Optional <Integration > = integration.getOptional(" integration" )
1290-
12911278 /* *
12921279 * A BCP-47 formatted locale string with the language the text message will be sent to. If
12931280 * there's no locale set, the language will be determined by the country code of the phone
@@ -1377,15 +1364,6 @@ private constructor(
13771364 @ExcludeMissing
13781365 fun _customCode (): JsonField <String > = customCode
13791366
1380- /* *
1381- * Returns the raw JSON value of [integration].
1382- *
1383- * Unlike [integration], this method doesn't throw if the JSON field has an unexpected type.
1384- */
1385- @JsonProperty(" integration" )
1386- @ExcludeMissing
1387- fun _integration (): JsonField <Integration > = integration
1388-
13891367 /* *
13901368 * Returns the raw JSON value of [locale].
13911369 *
@@ -1460,7 +1438,6 @@ private constructor(
14601438 private var callbackUrl: JsonField <String > = JsonMissing .of()
14611439 private var codeSize: JsonField <Long > = JsonMissing .of()
14621440 private var customCode: JsonField <String > = JsonMissing .of()
1463- private var integration: JsonField <Integration > = JsonMissing .of()
14641441 private var locale: JsonField <String > = JsonMissing .of()
14651442 private var method: JsonField <Method > = JsonMissing .of()
14661443 private var preferredChannel: JsonField <PreferredChannel > = JsonMissing .of()
@@ -1475,7 +1452,6 @@ private constructor(
14751452 callbackUrl = options.callbackUrl
14761453 codeSize = options.codeSize
14771454 customCode = options.customCode
1478- integration = options.integration
14791455 locale = options.locale
14801456 method = options.method
14811457 preferredChannel = options.preferredChannel
@@ -1549,20 +1525,6 @@ private constructor(
15491525 */
15501526 fun customCode (customCode : JsonField <String >) = apply { this .customCode = customCode }
15511527
1552- /* * The integration that triggered the verification. */
1553- fun integration (integration : Integration ) = integration(JsonField .of(integration))
1554-
1555- /* *
1556- * Sets [Builder.integration] to an arbitrary JSON value.
1557- *
1558- * You should usually call [Builder.integration] with a well-typed [Integration] value
1559- * instead. This method is primarily for setting the field to an undocumented or not yet
1560- * supported value.
1561- */
1562- fun integration (integration : JsonField <Integration >) = apply {
1563- this .integration = integration
1564- }
1565-
15661528 /* *
15671529 * A BCP-47 formatted locale string with the language the text message will be sent to.
15681530 * If there's no locale set, the language will be determined by the country code of the
@@ -1684,7 +1646,6 @@ private constructor(
16841646 callbackUrl,
16851647 codeSize,
16861648 customCode,
1687- integration,
16881649 locale,
16891650 method,
16901651 preferredChannel,
@@ -1706,7 +1667,6 @@ private constructor(
17061667 callbackUrl()
17071668 codeSize()
17081669 customCode()
1709- integration().ifPresent { it.validate() }
17101670 locale()
17111671 method().ifPresent { it.validate() }
17121672 preferredChannel().ifPresent { it.validate() }
@@ -1736,7 +1696,6 @@ private constructor(
17361696 (if (callbackUrl.asKnown().isPresent) 1 else 0 ) +
17371697 (if (codeSize.asKnown().isPresent) 1 else 0 ) +
17381698 (if (customCode.asKnown().isPresent) 1 else 0 ) +
1739- (integration.asKnown().getOrNull()?.validity() ? : 0 ) +
17401699 (if (locale.asKnown().isPresent) 1 else 0 ) +
17411700 (method.asKnown().getOrNull()?.validity() ? : 0 ) +
17421701 (preferredChannel.asKnown().getOrNull()?.validity() ? : 0 ) +
@@ -2107,138 +2066,6 @@ private constructor(
21072066 " AppRealm{platform=$platform , value=$value , additionalProperties=$additionalProperties }"
21082067 }
21092068
2110- /* * The integration that triggered the verification. */
2111- class Integration @JsonCreator private constructor(private val value : JsonField <String >) :
2112- Enum {
2113-
2114- /* *
2115- * Returns this class instance's raw value.
2116- *
2117- * This is usually only useful if this instance was deserialized from data that doesn't
2118- * match any known member, and you want to know that value. For example, if the SDK is
2119- * on an older version than the API, then the API may respond with new members that the
2120- * SDK is unaware of.
2121- */
2122- @com.fasterxml.jackson.annotation.JsonValue fun _value (): JsonField <String > = value
2123-
2124- companion object {
2125-
2126- @JvmField val AUTH0 = of(" auth0" )
2127-
2128- @JvmField val SUPABASE = of(" supabase" )
2129-
2130- @JvmStatic fun of (value : String ) = Integration (JsonField .of(value))
2131- }
2132-
2133- /* * An enum containing [Integration]'s known values. */
2134- enum class Known {
2135- AUTH0 ,
2136- SUPABASE ,
2137- }
2138-
2139- /* *
2140- * An enum containing [Integration]'s known values, as well as an [_UNKNOWN] member.
2141- *
2142- * An instance of [Integration] can contain an unknown value in a couple of cases:
2143- * - It was deserialized from data that doesn't match any known member. For example, if
2144- * the SDK is on an older version than the API, then the API may respond with new
2145- * members that the SDK is unaware of.
2146- * - It was constructed with an arbitrary value using the [of] method.
2147- */
2148- enum class Value {
2149- AUTH0 ,
2150- SUPABASE ,
2151- /* *
2152- * An enum member indicating that [Integration] was instantiated with an unknown
2153- * value.
2154- */
2155- _UNKNOWN ,
2156- }
2157-
2158- /* *
2159- * Returns an enum member corresponding to this class instance's value, or
2160- * [Value._UNKNOWN] if the class was instantiated with an unknown value.
2161- *
2162- * Use the [known] method instead if you're certain the value is always known or if you
2163- * want to throw for the unknown case.
2164- */
2165- fun value (): Value =
2166- when (this ) {
2167- AUTH0 -> Value .AUTH0
2168- SUPABASE -> Value .SUPABASE
2169- else -> Value ._UNKNOWN
2170- }
2171-
2172- /* *
2173- * Returns an enum member corresponding to this class instance's value.
2174- *
2175- * Use the [value] method instead if you're uncertain the value is always known and
2176- * don't want to throw for the unknown case.
2177- *
2178- * @throws PreludeInvalidDataException if this class instance's value is a not a known
2179- * member.
2180- */
2181- fun known (): Known =
2182- when (this ) {
2183- AUTH0 -> Known .AUTH0
2184- SUPABASE -> Known .SUPABASE
2185- else -> throw PreludeInvalidDataException (" Unknown Integration: $value " )
2186- }
2187-
2188- /* *
2189- * Returns this class instance's primitive wire representation.
2190- *
2191- * This differs from the [toString] method because that method is primarily for
2192- * debugging and generally doesn't throw.
2193- *
2194- * @throws PreludeInvalidDataException if this class instance's value does not have the
2195- * expected primitive type.
2196- */
2197- fun asString (): String =
2198- _value ().asString().orElseThrow {
2199- PreludeInvalidDataException (" Value is not a String" )
2200- }
2201-
2202- private var validated: Boolean = false
2203-
2204- fun validate (): Integration = apply {
2205- if (validated) {
2206- return @apply
2207- }
2208-
2209- known()
2210- validated = true
2211- }
2212-
2213- fun isValid (): Boolean =
2214- try {
2215- validate()
2216- true
2217- } catch (e: PreludeInvalidDataException ) {
2218- false
2219- }
2220-
2221- /* *
2222- * Returns a score indicating how many valid values are contained in this object
2223- * recursively.
2224- *
2225- * Used for best match union deserialization.
2226- */
2227- @JvmSynthetic internal fun validity (): Int = if (value() == Value ._UNKNOWN ) 0 else 1
2228-
2229- override fun equals (other : Any? ): Boolean {
2230- if (this == = other) {
2231- return true
2232- }
2233-
2234- return other is Integration && value == other.value
2235- }
2236-
2237- override fun hashCode () = value.hashCode()
2238-
2239- override fun toString () = value.toString()
2240- }
2241-
22422069 /* *
22432070 * The method used for verifying this phone number. The 'voice' option provides an
22442071 * accessible alternative for visually impaired users by delivering the verification code
@@ -2653,7 +2480,6 @@ private constructor(
26532480 callbackUrl == other.callbackUrl &&
26542481 codeSize == other.codeSize &&
26552482 customCode == other.customCode &&
2656- integration == other.integration &&
26572483 locale == other.locale &&
26582484 method == other.method &&
26592485 preferredChannel == other.preferredChannel &&
@@ -2669,7 +2495,6 @@ private constructor(
26692495 callbackUrl,
26702496 codeSize,
26712497 customCode,
2672- integration,
26732498 locale,
26742499 method,
26752500 preferredChannel,
@@ -2683,7 +2508,7 @@ private constructor(
26832508 override fun hashCode (): Int = hashCode
26842509
26852510 override fun toString () =
2686- " Options{appRealm=$appRealm , callbackUrl=$callbackUrl , codeSize=$codeSize , customCode=$customCode , integration= $integration , locale=$locale , method=$method , preferredChannel=$preferredChannel , senderId=$senderId , templateId=$templateId , variables=$variables , additionalProperties=$additionalProperties }"
2511+ " Options{appRealm=$appRealm , callbackUrl=$callbackUrl , codeSize=$codeSize , customCode=$customCode , locale=$locale , method=$method , preferredChannel=$preferredChannel , senderId=$senderId , templateId=$templateId , variables=$variables , additionalProperties=$additionalProperties }"
26872512 }
26882513
26892514 /* *
0 commit comments