@@ -27,35 +27,36 @@ class AllModels
2727private constructor (
2828 private val string: String? = null ,
2929 private val chatModel: ChatModel ? = null ,
30- private val unionMember2 : UnionMember2 ? = null ,
30+ private val responsesOnlyModel : ResponsesOnlyModel ? = null ,
3131 private val _json : JsonValue ? = null ,
3232) {
3333
3434 fun string (): Optional <String > = Optional .ofNullable(string)
3535
3636 fun chatModel (): Optional <ChatModel > = Optional .ofNullable(chatModel)
3737
38- fun unionMember2 (): Optional <UnionMember2 > = Optional .ofNullable(unionMember2 )
38+ fun responsesOnlyModel (): Optional <ResponsesOnlyModel > = Optional .ofNullable(responsesOnlyModel )
3939
4040 fun isString (): Boolean = string != null
4141
4242 fun isChatModel (): Boolean = chatModel != null
4343
44- fun isUnionMember2 (): Boolean = unionMember2 != null
44+ fun isResponsesOnlyModel (): Boolean = responsesOnlyModel != null
4545
4646 fun asString (): String = string.getOrThrow(" string" )
4747
4848 fun asChatModel (): ChatModel = chatModel.getOrThrow(" chatModel" )
4949
50- fun asUnionMember2 (): UnionMember2 = unionMember2.getOrThrow(" unionMember2" )
50+ fun asResponsesOnlyModel (): ResponsesOnlyModel =
51+ responsesOnlyModel.getOrThrow(" responsesOnlyModel" )
5152
5253 fun _json (): Optional <JsonValue > = Optional .ofNullable(_json )
5354
5455 fun <T > accept (visitor : Visitor <T >): T =
5556 when {
5657 string != null -> visitor.visitString(string)
5758 chatModel != null -> visitor.visitChatModel(chatModel)
58- unionMember2 != null -> visitor.visitUnionMember2(unionMember2 )
59+ responsesOnlyModel != null -> visitor.visitResponsesOnlyModel(responsesOnlyModel )
5960 else -> visitor.unknown(_json )
6061 }
6162
@@ -74,8 +75,8 @@ private constructor(
7475 chatModel.validate()
7576 }
7677
77- override fun visitUnionMember2 ( unionMember2 : UnionMember2 ) {
78- unionMember2 .validate()
78+ override fun visitResponsesOnlyModel ( responsesOnlyModel : ResponsesOnlyModel ) {
79+ responsesOnlyModel .validate()
7980 }
8081 }
8182 )
@@ -103,7 +104,8 @@ private constructor(
103104
104105 override fun visitChatModel (chatModel : ChatModel ) = chatModel.validity()
105106
106- override fun visitUnionMember2 (unionMember2 : UnionMember2 ) = unionMember2.validity()
107+ override fun visitResponsesOnlyModel (responsesOnlyModel : ResponsesOnlyModel ) =
108+ responsesOnlyModel.validity()
107109
108110 override fun unknown (json : JsonValue ? ) = 0
109111 }
@@ -114,16 +116,16 @@ private constructor(
114116 return true
115117 }
116118
117- return /* spotless:off */ other is AllModels && string == other.string && chatModel == other.chatModel && unionMember2 == other.unionMember2 /* spotless:on */
119+ return /* spotless:off */ other is AllModels && string == other.string && chatModel == other.chatModel && responsesOnlyModel == other.responsesOnlyModel /* spotless:on */
118120 }
119121
120- override fun hashCode (): Int = /* spotless:off */ Objects .hash(string, chatModel, unionMember2 ) /* spotless:on */
122+ override fun hashCode (): Int = /* spotless:off */ Objects .hash(string, chatModel, responsesOnlyModel ) /* spotless:on */
121123
122124 override fun toString (): String =
123125 when {
124126 string != null -> " AllModels{string=$string }"
125127 chatModel != null -> " AllModels{chatModel=$chatModel }"
126- unionMember2 != null -> " AllModels{unionMember2= $unionMember2 }"
128+ responsesOnlyModel != null -> " AllModels{responsesOnlyModel= $responsesOnlyModel }"
127129 _json != null -> " AllModels{_unknown=$_json }"
128130 else -> throw IllegalStateException (" Invalid AllModels" )
129131 }
@@ -135,7 +137,8 @@ private constructor(
135137 @JvmStatic fun ofChatModel (chatModel : ChatModel ) = AllModels (chatModel = chatModel)
136138
137139 @JvmStatic
138- fun ofUnionMember2 (unionMember2 : UnionMember2 ) = AllModels (unionMember2 = unionMember2)
140+ fun ofResponsesOnlyModel (responsesOnlyModel : ResponsesOnlyModel ) =
141+ AllModels (responsesOnlyModel = responsesOnlyModel)
139142 }
140143
141144 /* * An interface that defines how to map each variant of [AllModels] to a value of type [T]. */
@@ -145,7 +148,7 @@ private constructor(
145148
146149 fun visitChatModel (chatModel : ChatModel ): T
147150
148- fun visitUnionMember2 ( unionMember2 : UnionMember2 ): T
151+ fun visitResponsesOnlyModel ( responsesOnlyModel : ResponsesOnlyModel ): T
149152
150153 /* *
151154 * Maps an unknown variant of [AllModels] to a value of type [T].
@@ -171,8 +174,8 @@ private constructor(
171174 tryDeserialize(node, jacksonTypeRef<ChatModel >())?.let {
172175 AllModels (chatModel = it, _json = json)
173176 },
174- tryDeserialize(node, jacksonTypeRef<UnionMember2 >())?.let {
175- AllModels (unionMember2 = it, _json = json)
177+ tryDeserialize(node, jacksonTypeRef<ResponsesOnlyModel >())?.let {
178+ AllModels (responsesOnlyModel = it, _json = json)
176179 },
177180 tryDeserialize(node, jacksonTypeRef<String >())?.let {
178181 AllModels (string = it, _json = json)
@@ -203,15 +206,16 @@ private constructor(
203206 when {
204207 value.string != null -> generator.writeObject(value.string)
205208 value.chatModel != null -> generator.writeObject(value.chatModel)
206- value.unionMember2 != null -> generator.writeObject(value.unionMember2 )
209+ value.responsesOnlyModel != null -> generator.writeObject(value.responsesOnlyModel )
207210 value._json != null -> generator.writeObject(value._json )
208211 else -> throw IllegalStateException (" Invalid AllModels" )
209212 }
210213 }
211214 }
212215
213- class UnionMember2 @JsonCreator private constructor(private val value : JsonField <String >) :
214- Enum {
216+ class ResponsesOnlyModel
217+ @JsonCreator
218+ private constructor (private val value: JsonField <String >) : Enum {
215219
216220 /* *
217221 * Returns this class instance's raw value.
@@ -233,10 +237,10 @@ private constructor(
233237
234238 @JvmField val COMPUTER_USE_PREVIEW_2025_03_11 = of(" computer-use-preview-2025-03-11" )
235239
236- @JvmStatic fun of (value : String ) = UnionMember2 (JsonField .of(value))
240+ @JvmStatic fun of (value : String ) = ResponsesOnlyModel (JsonField .of(value))
237241 }
238242
239- /* * An enum containing [UnionMember2 ]'s known values. */
243+ /* * An enum containing [ResponsesOnlyModel ]'s known values. */
240244 enum class Known {
241245 O1_PRO ,
242246 O1_PRO_2025_03_19 ,
@@ -245,9 +249,9 @@ private constructor(
245249 }
246250
247251 /* *
248- * An enum containing [UnionMember2 ]'s known values, as well as an [_UNKNOWN] member.
252+ * An enum containing [ResponsesOnlyModel ]'s known values, as well as an [_UNKNOWN] member.
249253 *
250- * An instance of [UnionMember2 ] can contain an unknown value in a couple of cases:
254+ * An instance of [ResponsesOnlyModel ] can contain an unknown value in a couple of cases:
251255 * - It was deserialized from data that doesn't match any known member. For example, if the
252256 * SDK is on an older version than the API, then the API may respond with new members that
253257 * the SDK is unaware of.
@@ -259,7 +263,8 @@ private constructor(
259263 COMPUTER_USE_PREVIEW ,
260264 COMPUTER_USE_PREVIEW_2025_03_11 ,
261265 /* *
262- * An enum member indicating that [UnionMember2] was instantiated with an unknown value.
266+ * An enum member indicating that [ResponsesOnlyModel] was instantiated with an unknown
267+ * value.
263268 */
264269 _UNKNOWN ,
265270 }
@@ -295,7 +300,7 @@ private constructor(
295300 O1_PRO_2025_03_19 -> Known .O1_PRO_2025_03_19
296301 COMPUTER_USE_PREVIEW -> Known .COMPUTER_USE_PREVIEW
297302 COMPUTER_USE_PREVIEW_2025_03_11 -> Known .COMPUTER_USE_PREVIEW_2025_03_11
298- else -> throw OpenAIInvalidDataException (" Unknown UnionMember2 : $value " )
303+ else -> throw OpenAIInvalidDataException (" Unknown ResponsesOnlyModel : $value " )
299304 }
300305
301306 /* *
@@ -312,7 +317,7 @@ private constructor(
312317
313318 private var validated: Boolean = false
314319
315- fun validate (): UnionMember2 = apply {
320+ fun validate (): ResponsesOnlyModel = apply {
316321 if (validated) {
317322 return @apply
318323 }
@@ -342,7 +347,7 @@ private constructor(
342347 return true
343348 }
344349
345- return /* spotless:off */ other is UnionMember2 && value == other.value /* spotless:on */
350+ return /* spotless:off */ other is ResponsesOnlyModel && value == other.value /* spotless:on */
346351 }
347352
348353 override fun hashCode () = value.hashCode()
0 commit comments