@@ -91,16 +91,17 @@ private constructor(
9191
9292 fun body (body : Body ) = apply { this .body = body }
9393
94- /* * Alias for calling [body] with `Body.ofStrings(strings)`. */
95- fun bodyOfStrings (strings : List <String >) = body(Body .ofStrings(strings))
94+ /* * Alias for calling [body] with `Body.ofRunsUuidArray(runsUuidArray)`. */
95+ fun bodyOfRunsUuidArray (runsUuidArray : List <String >) =
96+ body(Body .ofRunsUuidArray(runsUuidArray))
9697
9798 /* *
9899 * Alias for calling [body] with
99- * `Body.ofAnnotationQueueRunAddSchemas(annotationQueueRunAddSchemas )`.
100+ * `Body.ofRunsAnnotationQueueRunAddSchemaArray(runsAnnotationQueueRunAddSchemaArray )`.
100101 */
101- fun bodyOfAnnotationQueueRunAddSchemas (
102- annotationQueueRunAddSchemas : List <Body .AnnotationQueueRunAddSchema >
103- ) = body(Body .ofAnnotationQueueRunAddSchemas(annotationQueueRunAddSchemas ))
102+ fun bodyOfRunsAnnotationQueueRunAddSchemaArray (
103+ runsAnnotationQueueRunAddSchemaArray : List <Body .AnnotationQueueRunAddSchema >
104+ ) = body(Body .ofRunsAnnotationQueueRunAddSchemaArray(runsAnnotationQueueRunAddSchemaArray ))
104105
105106 fun additionalHeaders (additionalHeaders : Headers ) = apply {
106107 this .additionalHeaders.clear()
@@ -237,32 +238,35 @@ private constructor(
237238 @JsonSerialize(using = Body .Serializer ::class )
238239 class Body
239240 private constructor (
240- private val strings : List <String >? = null ,
241- private val annotationQueueRunAddSchemas : List <AnnotationQueueRunAddSchema >? = null ,
241+ private val runsUuidArray : List <String >? = null ,
242+ private val runsAnnotationQueueRunAddSchemaArray : List <AnnotationQueueRunAddSchema >? = null ,
242243 private val _json : JsonValue ? = null ,
243244 ) {
244245
245- fun strings (): Optional <List <String >> = Optional .ofNullable(strings )
246+ fun runsUuidArray (): Optional <List <String >> = Optional .ofNullable(runsUuidArray )
246247
247- fun annotationQueueRunAddSchemas (): Optional <List <AnnotationQueueRunAddSchema >> =
248- Optional .ofNullable(annotationQueueRunAddSchemas )
248+ fun runsAnnotationQueueRunAddSchemaArray (): Optional <List <AnnotationQueueRunAddSchema >> =
249+ Optional .ofNullable(runsAnnotationQueueRunAddSchemaArray )
249250
250- fun isStrings (): Boolean = strings != null
251+ fun isRunsUuidArray (): Boolean = runsUuidArray != null
251252
252- fun isAnnotationQueueRunAddSchemas (): Boolean = annotationQueueRunAddSchemas != null
253+ fun isRunsAnnotationQueueRunAddSchemaArray (): Boolean =
254+ runsAnnotationQueueRunAddSchemaArray != null
253255
254- fun asStrings (): List <String > = strings .getOrThrow(" strings " )
256+ fun asRunsUuidArray (): List <String > = runsUuidArray .getOrThrow(" runsUuidArray " )
255257
256- fun asAnnotationQueueRunAddSchemas (): List <AnnotationQueueRunAddSchema > =
257- annotationQueueRunAddSchemas .getOrThrow(" annotationQueueRunAddSchemas " )
258+ fun asRunsAnnotationQueueRunAddSchemaArray (): List <AnnotationQueueRunAddSchema > =
259+ runsAnnotationQueueRunAddSchemaArray .getOrThrow(" runsAnnotationQueueRunAddSchemaArray " )
258260
259261 fun _json (): Optional <JsonValue > = Optional .ofNullable(_json )
260262
261263 fun <T > accept (visitor : Visitor <T >): T =
262264 when {
263- strings != null -> visitor.visitStrings(strings)
264- annotationQueueRunAddSchemas != null ->
265- visitor.visitAnnotationQueueRunAddSchemas(annotationQueueRunAddSchemas)
265+ runsUuidArray != null -> visitor.visitRunsUuidArray(runsUuidArray)
266+ runsAnnotationQueueRunAddSchemaArray != null ->
267+ visitor.visitRunsAnnotationQueueRunAddSchemaArray(
268+ runsAnnotationQueueRunAddSchemaArray
269+ )
266270 else -> visitor.unknown(_json )
267271 }
268272
@@ -275,12 +279,12 @@ private constructor(
275279
276280 accept(
277281 object : Visitor <Unit > {
278- override fun visitStrings ( strings : List <String >) {}
282+ override fun visitRunsUuidArray ( runsUuidArray : List <String >) {}
279283
280- override fun visitAnnotationQueueRunAddSchemas (
281- annotationQueueRunAddSchemas : List <AnnotationQueueRunAddSchema >
284+ override fun visitRunsAnnotationQueueRunAddSchemaArray (
285+ runsAnnotationQueueRunAddSchemaArray : List <AnnotationQueueRunAddSchema >
282286 ) {
283- annotationQueueRunAddSchemas .forEach { it.validate() }
287+ runsAnnotationQueueRunAddSchemaArray .forEach { it.validate() }
284288 }
285289 }
286290 )
@@ -305,11 +309,12 @@ private constructor(
305309 internal fun validity (): Int =
306310 accept(
307311 object : Visitor <Int > {
308- override fun visitStrings (strings : List <String >) = strings.size
312+ override fun visitRunsUuidArray (runsUuidArray : List <String >) =
313+ runsUuidArray.size
309314
310- override fun visitAnnotationQueueRunAddSchemas (
311- annotationQueueRunAddSchemas : List <AnnotationQueueRunAddSchema >
312- ) = annotationQueueRunAddSchemas .sumOf { it.validity().toInt() }
315+ override fun visitRunsAnnotationQueueRunAddSchemaArray (
316+ runsAnnotationQueueRunAddSchemaArray : List <AnnotationQueueRunAddSchema >
317+ ) = runsAnnotationQueueRunAddSchemaArray .sumOf { it.validity().toInt() }
313318
314319 override fun unknown (json : JsonValue ? ) = 0
315320 }
@@ -321,38 +326,45 @@ private constructor(
321326 }
322327
323328 return other is Body &&
324- strings == other.strings &&
325- annotationQueueRunAddSchemas == other.annotationQueueRunAddSchemas
329+ runsUuidArray == other.runsUuidArray &&
330+ runsAnnotationQueueRunAddSchemaArray == other.runsAnnotationQueueRunAddSchemaArray
326331 }
327332
328- override fun hashCode (): Int = Objects .hash(strings, annotationQueueRunAddSchemas)
333+ override fun hashCode (): Int =
334+ Objects .hash(runsUuidArray, runsAnnotationQueueRunAddSchemaArray)
329335
330336 override fun toString (): String =
331337 when {
332- strings != null -> " Body{strings= $strings }"
333- annotationQueueRunAddSchemas != null ->
334- " Body{annotationQueueRunAddSchemas= $annotationQueueRunAddSchemas }"
338+ runsUuidArray != null -> " Body{runsUuidArray= $runsUuidArray }"
339+ runsAnnotationQueueRunAddSchemaArray != null ->
340+ " Body{runsAnnotationQueueRunAddSchemaArray= $runsAnnotationQueueRunAddSchemaArray }"
335341 _json != null -> " Body{_unknown=$_json }"
336342 else -> throw IllegalStateException (" Invalid Body" )
337343 }
338344
339345 companion object {
340346
341- @JvmStatic fun ofStrings (strings : List <String >) = Body (strings = strings.toImmutable())
347+ @JvmStatic
348+ fun ofRunsUuidArray (runsUuidArray : List <String >) =
349+ Body (runsUuidArray = runsUuidArray.toImmutable())
342350
343351 @JvmStatic
344- fun ofAnnotationQueueRunAddSchemas (
345- annotationQueueRunAddSchemas : List <AnnotationQueueRunAddSchema >
346- ) = Body (annotationQueueRunAddSchemas = annotationQueueRunAddSchemas.toImmutable())
352+ fun ofRunsAnnotationQueueRunAddSchemaArray (
353+ runsAnnotationQueueRunAddSchemaArray : List <AnnotationQueueRunAddSchema >
354+ ) =
355+ Body (
356+ runsAnnotationQueueRunAddSchemaArray =
357+ runsAnnotationQueueRunAddSchemaArray.toImmutable()
358+ )
347359 }
348360
349361 /* * An interface that defines how to map each variant of [Body] to a value of type [T]. */
350362 interface Visitor <out T > {
351363
352- fun visitStrings ( strings : List <String >): T
364+ fun visitRunsUuidArray ( runsUuidArray : List <String >): T
353365
354- fun visitAnnotationQueueRunAddSchemas (
355- annotationQueueRunAddSchemas : List <AnnotationQueueRunAddSchema >
366+ fun visitRunsAnnotationQueueRunAddSchemaArray (
367+ runsAnnotationQueueRunAddSchemaArray : List <AnnotationQueueRunAddSchema >
356368 ): T
357369
358370 /* *
@@ -377,13 +389,15 @@ private constructor(
377389 val bestMatches =
378390 sequenceOf(
379391 tryDeserialize(node, jacksonTypeRef<List <String >>())?.let {
380- Body (strings = it, _json = json)
392+ Body (runsUuidArray = it, _json = json)
381393 },
382394 tryDeserialize(
383395 node,
384396 jacksonTypeRef<List <AnnotationQueueRunAddSchema >>(),
385397 )
386- ?.let { Body (annotationQueueRunAddSchemas = it, _json = json) },
398+ ?.let {
399+ Body (runsAnnotationQueueRunAddSchemaArray = it, _json = json)
400+ },
387401 )
388402 .filterNotNull()
389403 .allMaxBy { it.validity() }
@@ -409,9 +423,9 @@ private constructor(
409423 provider : SerializerProvider ,
410424 ) {
411425 when {
412- value.strings != null -> generator.writeObject(value.strings )
413- value.annotationQueueRunAddSchemas != null ->
414- generator.writeObject(value.annotationQueueRunAddSchemas )
426+ value.runsUuidArray != null -> generator.writeObject(value.runsUuidArray )
427+ value.runsAnnotationQueueRunAddSchemaArray != null ->
428+ generator.writeObject(value.runsAnnotationQueueRunAddSchemaArray )
415429 value._json != null -> generator.writeObject(value._json )
416430 else -> throw IllegalStateException (" Invalid Body" )
417431 }
0 commit comments