@@ -36,28 +36,28 @@ import kotlin.jvm.optionals.getOrNull
3636class Individual
3737private constructor (
3838 private val unionMember0: UnionMember0 ? = null ,
39- private val unionMember1 : UnionMember1 ? = null ,
39+ private val batchError : BatchError ? = null ,
4040 private val _json : JsonValue ? = null ,
4141) {
4242
4343 fun unionMember0 (): Optional <UnionMember0 > = Optional .ofNullable(unionMember0)
4444
45- fun unionMember1 (): Optional <UnionMember1 > = Optional .ofNullable(unionMember1 )
45+ fun batchError (): Optional <BatchError > = Optional .ofNullable(batchError )
4646
4747 fun isUnionMember0 (): Boolean = unionMember0 != null
4848
49- fun isUnionMember1 (): Boolean = unionMember1 != null
49+ fun isBatchError (): Boolean = batchError != null
5050
5151 fun asUnionMember0 (): UnionMember0 = unionMember0.getOrThrow(" unionMember0" )
5252
53- fun asUnionMember1 (): UnionMember1 = unionMember1 .getOrThrow(" unionMember1 " )
53+ fun asBatchError (): BatchError = batchError .getOrThrow(" batchError " )
5454
5555 fun _json (): Optional <JsonValue > = Optional .ofNullable(_json )
5656
5757 fun <T > accept (visitor : Visitor <T >): T =
5858 when {
5959 unionMember0 != null -> visitor.visitUnionMember0(unionMember0)
60- unionMember1 != null -> visitor.visitUnionMember1(unionMember1 )
60+ batchError != null -> visitor.visitBatchError(batchError )
6161 else -> visitor.unknown(_json )
6262 }
6363
@@ -74,8 +74,8 @@ private constructor(
7474 unionMember0.validate()
7575 }
7676
77- override fun visitUnionMember1 ( unionMember1 : UnionMember1 ) {
78- unionMember1 .validate()
77+ override fun visitBatchError ( batchError : BatchError ) {
78+ batchError .validate()
7979 }
8080 }
8181 )
@@ -101,7 +101,7 @@ private constructor(
101101 object : Visitor <Int > {
102102 override fun visitUnionMember0 (unionMember0 : UnionMember0 ) = unionMember0.validity()
103103
104- override fun visitUnionMember1 ( unionMember1 : UnionMember1 ) = unionMember1 .validity()
104+ override fun visitBatchError ( batchError : BatchError ) = batchError .validity()
105105
106106 override fun unknown (json : JsonValue ? ) = 0
107107 }
@@ -112,15 +112,15 @@ private constructor(
112112 return true
113113 }
114114
115- return /* spotless:off */ other is Individual && unionMember0 == other.unionMember0 && unionMember1 == other.unionMember1 /* spotless:on */
115+ return /* spotless:off */ other is Individual && unionMember0 == other.unionMember0 && batchError == other.batchError /* spotless:on */
116116 }
117117
118- override fun hashCode (): Int = /* spotless:off */ Objects .hash(unionMember0, unionMember1 ) /* spotless:on */
118+ override fun hashCode (): Int = /* spotless:off */ Objects .hash(unionMember0, batchError ) /* spotless:on */
119119
120120 override fun toString (): String =
121121 when {
122122 unionMember0 != null -> " Individual{unionMember0=$unionMember0 }"
123- unionMember1 != null -> " Individual{unionMember1= $unionMember1 }"
123+ batchError != null -> " Individual{batchError= $batchError }"
124124 _json != null -> " Individual{_unknown=$_json }"
125125 else -> throw IllegalStateException (" Invalid Individual" )
126126 }
@@ -130,16 +130,15 @@ private constructor(
130130 @JvmStatic
131131 fun ofUnionMember0 (unionMember0 : UnionMember0 ) = Individual (unionMember0 = unionMember0)
132132
133- @JvmStatic
134- fun ofUnionMember1 (unionMember1 : UnionMember1 ) = Individual (unionMember1 = unionMember1)
133+ @JvmStatic fun ofBatchError (batchError : BatchError ) = Individual (batchError = batchError)
135134 }
136135
137136 /* * An interface that defines how to map each variant of [Individual] to a value of type [T]. */
138137 interface Visitor <out T > {
139138
140139 fun visitUnionMember0 (unionMember0 : UnionMember0 ): T
141140
142- fun visitUnionMember1 ( unionMember1 : UnionMember1 ): T
141+ fun visitBatchError ( batchError : BatchError ): T
143142
144143 /* *
145144 * Maps an unknown variant of [Individual] to a value of type [T].
@@ -165,8 +164,8 @@ private constructor(
165164 tryDeserialize(node, jacksonTypeRef<UnionMember0 >())?.let {
166165 Individual (unionMember0 = it, _json = json)
167166 },
168- tryDeserialize(node, jacksonTypeRef<UnionMember1 >())?.let {
169- Individual (unionMember1 = it, _json = json)
167+ tryDeserialize(node, jacksonTypeRef<BatchError >())?.let {
168+ Individual (batchError = it, _json = json)
170169 },
171170 )
172171 .filterNotNull()
@@ -193,7 +192,7 @@ private constructor(
193192 ) {
194193 when {
195194 value.unionMember0 != null -> generator.writeObject(value.unionMember0)
196- value.unionMember1 != null -> generator.writeObject(value.unionMember1 )
195+ value.batchError != null -> generator.writeObject(value.batchError )
197196 value._json != null -> generator.writeObject(value._json )
198197 else -> throw IllegalStateException (" Invalid Individual" )
199198 }
@@ -1874,7 +1873,7 @@ private constructor(
18741873 " UnionMember0{id=$id , dob=$dob , ethnicity=$ethnicity , firstName=$firstName , gender=$gender , lastName=$lastName , middleName=$middleName , phoneNumbers=$phoneNumbers , preferredName=$preferredName , residence=$residence , emails=$emails , encryptedSsn=$encryptedSsn , ssn=$ssn , additionalProperties=$additionalProperties }"
18751874 }
18761875
1877- class UnionMember1
1876+ class BatchError
18781877 private constructor (
18791878 private val code: JsonField <Double >,
18801879 private val message: JsonField <String >,
@@ -1960,7 +1959,7 @@ private constructor(
19601959 companion object {
19611960
19621961 /* *
1963- * Returns a mutable builder for constructing an instance of [UnionMember1 ].
1962+ * Returns a mutable builder for constructing an instance of [BatchError ].
19641963 *
19651964 * The following fields are required:
19661965 * ```java
@@ -1972,7 +1971,7 @@ private constructor(
19721971 @JvmStatic fun builder () = Builder ()
19731972 }
19741973
1975- /* * A builder for [UnionMember1 ]. */
1974+ /* * A builder for [BatchError ]. */
19761975 class Builder internal constructor() {
19771976
19781977 private var code: JsonField <Double >? = null
@@ -1982,12 +1981,12 @@ private constructor(
19821981 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
19831982
19841983 @JvmSynthetic
1985- internal fun from (unionMember1 : UnionMember1 ) = apply {
1986- code = unionMember1 .code
1987- message = unionMember1 .message
1988- name = unionMember1 .name
1989- finchCode = unionMember1 .finchCode
1990- additionalProperties = unionMember1 .additionalProperties.toMutableMap()
1984+ internal fun from (batchError : BatchError ) = apply {
1985+ code = batchError .code
1986+ message = batchError .message
1987+ name = batchError .name
1988+ finchCode = batchError .finchCode
1989+ additionalProperties = batchError .additionalProperties.toMutableMap()
19911990 }
19921991
19931992 fun code (code : Double ) = code(JsonField .of(code))
@@ -2054,7 +2053,7 @@ private constructor(
20542053 }
20552054
20562055 /* *
2057- * Returns an immutable instance of [UnionMember1 ].
2056+ * Returns an immutable instance of [BatchError ].
20582057 *
20592058 * Further updates to this [Builder] will not mutate the returned instance.
20602059 *
@@ -2067,8 +2066,8 @@ private constructor(
20672066 *
20682067 * @throws IllegalStateException if any required field is unset.
20692068 */
2070- fun build (): UnionMember1 =
2071- UnionMember1 (
2069+ fun build (): BatchError =
2070+ BatchError (
20722071 checkRequired(" code" , code),
20732072 checkRequired(" message" , message),
20742073 checkRequired(" name" , name),
@@ -2079,7 +2078,7 @@ private constructor(
20792078
20802079 private var validated: Boolean = false
20812080
2082- fun validate (): UnionMember1 = apply {
2081+ fun validate (): BatchError = apply {
20832082 if (validated) {
20842083 return @apply
20852084 }
@@ -2117,7 +2116,7 @@ private constructor(
21172116 return true
21182117 }
21192118
2120- return /* spotless:off */ other is UnionMember1 && code == other.code && message == other.message && name == other.name && finchCode == other.finchCode && additionalProperties == other.additionalProperties /* spotless:on */
2119+ return /* spotless:off */ other is BatchError && code == other.code && message == other.message && name == other.name && finchCode == other.finchCode && additionalProperties == other.additionalProperties /* spotless:on */
21212120 }
21222121
21232122 /* spotless:off */
@@ -2127,6 +2126,6 @@ private constructor(
21272126 override fun hashCode (): Int = hashCode
21282127
21292128 override fun toString () =
2130- " UnionMember1 {code=$code , message=$message , name=$name , finchCode=$finchCode , additionalProperties=$additionalProperties }"
2129+ " BatchError {code=$code , message=$message , name=$name , finchCode=$finchCode , additionalProperties=$additionalProperties }"
21312130 }
21322131}
0 commit comments