Skip to content

Commit acdb1fc

Browse files
docs: add comment for arbitrary value fields
1 parent 77f36ca commit acdb1fc

10 files changed

Lines changed: 188 additions & 14 deletions

File tree

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/commits/testresults/TestResultListResponse.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,15 @@ private constructor(
14871487
*/
14881488
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
14891489

1490-
/** The test description. */
1490+
/**
1491+
* The test description.
1492+
*
1493+
* This arbitrary value can be deserialized into a custom type using the `convert`
1494+
* method:
1495+
* ```java
1496+
* MyClass myObject = goal.description().convert(MyClass.class);
1497+
* ```
1498+
*/
14911499
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
14921500

14931501
/**
@@ -3508,6 +3516,13 @@ private constructor(
35083516
*/
35093517
fun name(): String = name.getRequired("name")
35103518

3519+
/**
3520+
* This arbitrary value can be deserialized into a custom type using the
3521+
* `convert` method:
3522+
* ```java
3523+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
3524+
* ```
3525+
*/
35113526
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
35123527

35133528
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/data/DataStreamParams.kt

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,15 @@ private constructor(
982982
fun latencyColumnName(): Optional<String> =
983983
latencyColumnName.getOptional("latencyColumnName")
984984

985-
/** Object with metadata. */
985+
/**
986+
* Object with metadata.
987+
*
988+
* This arbitrary value can be deserialized into a custom type using the `convert`
989+
* method:
990+
* ```java
991+
* MyClass myObject = llmData.metadata().convert(MyClass.class);
992+
* ```
993+
*/
986994
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata
987995

988996
/**
@@ -1945,7 +1953,15 @@ private constructor(
19451953
fun latencyColumnName(): Optional<String> =
19461954
latencyColumnName.getOptional("latencyColumnName")
19471955

1948-
/** Object with metadata. */
1956+
/**
1957+
* Object with metadata.
1958+
*
1959+
* This arbitrary value can be deserialized into a custom type using the `convert`
1960+
* method:
1961+
* ```java
1962+
* MyClass myObject = tabularClassificationData.metadata().convert(MyClass.class);
1963+
* ```
1964+
*/
19491965
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata
19501966

19511967
/**
@@ -2543,7 +2559,15 @@ private constructor(
25432559
fun latencyColumnName(): Optional<String> =
25442560
latencyColumnName.getOptional("latencyColumnName")
25452561

2546-
/** Object with metadata. */
2562+
/**
2563+
* Object with metadata.
2564+
*
2565+
* This arbitrary value can be deserialized into a custom type using the `convert`
2566+
* method:
2567+
* ```java
2568+
* MyClass myObject = tabularRegressionData.metadata().convert(MyClass.class);
2569+
* ```
2570+
*/
25472571
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata
25482572

25492573
/**
@@ -3048,7 +3072,15 @@ private constructor(
30483072
fun latencyColumnName(): Optional<String> =
30493073
latencyColumnName.getOptional("latencyColumnName")
30503074

3051-
/** Object with metadata. */
3075+
/**
3076+
* Object with metadata.
3077+
*
3078+
* This arbitrary value can be deserialized into a custom type using the `convert`
3079+
* method:
3080+
* ```java
3081+
* MyClass myObject = textClassificationData.metadata().convert(MyClass.class);
3082+
* ```
3083+
*/
30523084
@JsonProperty("metadata") @ExcludeMissing fun _metadata(): JsonValue = metadata
30533085

30543086
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/rows/RowUpdateParams.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ private constructor(
3535
/** Specify the inference id as a query param. */
3636
fun inferenceId(): String = inferenceId
3737

38+
/**
39+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
40+
* ```java
41+
* MyClass myObject = rowUpdateParams.row().convert(MyClass.class);
42+
* ```
43+
*/
3844
fun _row(): JsonValue = body._row()
3945

4046
/**
@@ -302,6 +308,12 @@ private constructor(
302308
@JsonProperty("config") @ExcludeMissing config: JsonField<Config> = JsonMissing.of(),
303309
) : this(row, config, mutableMapOf())
304310

311+
/**
312+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
313+
* ```java
314+
* MyClass myObject = body.row().convert(MyClass.class);
315+
* ```
316+
*/
305317
@JsonProperty("row") @ExcludeMissing fun _row(): JsonValue = row
306318

307319
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/inferencepipelines/testresults/TestResultListResponse.kt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,15 @@ private constructor(
14871487
*/
14881488
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
14891489

1490-
/** The test description. */
1490+
/**
1491+
* The test description.
1492+
*
1493+
* This arbitrary value can be deserialized into a custom type using the `convert`
1494+
* method:
1495+
* ```java
1496+
* MyClass myObject = goal.description().convert(MyClass.class);
1497+
* ```
1498+
*/
14911499
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
14921500

14931501
/**
@@ -3508,6 +3516,13 @@ private constructor(
35083516
*/
35093517
fun name(): String = name.getRequired("name")
35103518

3519+
/**
3520+
* This arbitrary value can be deserialized into a custom type using the
3521+
* `convert` method:
3522+
* ```java
3523+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
3524+
* ```
3525+
*/
35113526
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
35123527

35133528
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateParams.kt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ private constructor(
9494
*/
9595
fun dateUpdated(): OffsetDateTime = body.dateUpdated()
9696

97-
/** The test description. */
97+
/**
98+
* The test description.
99+
*
100+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
101+
* ```java
102+
* MyClass myObject = testCreateParams.description().convert(MyClass.class);
103+
* ```
104+
*/
98105
fun _description(): JsonValue = body._description()
99106

100107
/**
@@ -1304,7 +1311,14 @@ private constructor(
13041311
*/
13051312
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
13061313

1307-
/** The test description. */
1314+
/**
1315+
* The test description.
1316+
*
1317+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
1318+
* ```java
1319+
* MyClass myObject = body.description().convert(MyClass.class);
1320+
* ```
1321+
*/
13081322
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
13091323

13101324
/**
@@ -3575,6 +3589,13 @@ private constructor(
35753589
*/
35763590
fun name(): String = name.getRequired("name")
35773591

3592+
/**
3593+
* This arbitrary value can be deserialized into a custom type using the `convert`
3594+
* method:
3595+
* ```java
3596+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
3597+
* ```
3598+
*/
35783599
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
35793600

35803601
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestCreateResponse.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,14 @@ private constructor(
204204
*/
205205
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
206206

207-
/** The test description. */
207+
/**
208+
* The test description.
209+
*
210+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
211+
* ```java
212+
* MyClass myObject = testCreateResponse.description().convert(MyClass.class);
213+
* ```
214+
*/
208215
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
209216

210217
/**
@@ -2380,6 +2387,13 @@ private constructor(
23802387
*/
23812388
fun name(): String = name.getRequired("name")
23822389

2390+
/**
2391+
* This arbitrary value can be deserialized into a custom type using the `convert`
2392+
* method:
2393+
* ```java
2394+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
2395+
* ```
2396+
*/
23832397
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
23842398

23852399
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestListResponse.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,14 @@ private constructor(
361361
*/
362362
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
363363

364-
/** The test description. */
364+
/**
365+
* The test description.
366+
*
367+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
368+
* ```java
369+
* MyClass myObject = item.description().convert(MyClass.class);
370+
* ```
371+
*/
365372
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
366373

367374
/**
@@ -2578,6 +2585,13 @@ private constructor(
25782585
*/
25792586
fun name(): String = name.getRequired("name")
25802587

2588+
/**
2589+
* This arbitrary value can be deserialized into a custom type using the `convert`
2590+
* method:
2591+
* ```java
2592+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
2593+
* ```
2594+
*/
25812595
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
25822596

25832597
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/projects/tests/TestUpdateParams.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,14 @@ private constructor(
497497
*/
498498
fun archived(): Optional<Boolean> = archived.getOptional("archived")
499499

500-
/** The test description. */
500+
/**
501+
* The test description.
502+
*
503+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
504+
* ```java
505+
* MyClass myObject = payload.description().convert(MyClass.class);
506+
* ```
507+
*/
501508
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
502509

503510
/**
@@ -1619,6 +1626,13 @@ private constructor(
16191626
*/
16201627
fun name(): String = name.getRequired("name")
16211628

1629+
/**
1630+
* This arbitrary value can be deserialized into a custom type using the `convert`
1631+
* method:
1632+
* ```java
1633+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
1634+
* ```
1635+
*/
16221636
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
16231637

16241638
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/storage/presignedurl/PresignedUrlCreateResponse.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,14 @@ private constructor(
4949
*/
5050
fun url(): String = url.getRequired("url")
5151

52-
/** Fields to include in the body of the upload. Only needed by s3 */
52+
/**
53+
* Fields to include in the body of the upload. Only needed by s3
54+
*
55+
* This arbitrary value can be deserialized into a custom type using the `convert` method:
56+
* ```java
57+
* MyClass myObject = presignedUrlCreateResponse.fields().convert(MyClass.class);
58+
* ```
59+
*/
5360
@JsonProperty("fields") @ExcludeMissing fun _fields(): JsonValue = fields
5461

5562
/**

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/tests/TestListResultsResponse.kt

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,15 @@ private constructor(
15331533
*/
15341534
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
15351535

1536-
/** The test description. */
1536+
/**
1537+
* The test description.
1538+
*
1539+
* This arbitrary value can be deserialized into a custom type using the `convert`
1540+
* method:
1541+
* ```java
1542+
* MyClass myObject = goal.description().convert(MyClass.class);
1543+
* ```
1544+
*/
15371545
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
15381546

15391547
/**
@@ -3554,6 +3562,13 @@ private constructor(
35543562
*/
35553563
fun name(): String = name.getRequired("name")
35563564

3565+
/**
3566+
* This arbitrary value can be deserialized into a custom type using the
3567+
* `convert` method:
3568+
* ```java
3569+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
3570+
* ```
3571+
*/
35573572
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
35583573

35593574
/**
@@ -8189,7 +8204,15 @@ private constructor(
81898204
*/
81908205
fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
81918206

8192-
/** The test description. */
8207+
/**
8208+
* The test description.
8209+
*
8210+
* This arbitrary value can be deserialized into a custom type using the `convert`
8211+
* method:
8212+
* ```java
8213+
* MyClass myObject = goal.description().convert(MyClass.class);
8214+
* ```
8215+
*/
81938216
@JsonProperty("description") @ExcludeMissing fun _description(): JsonValue = description
81948217

81958218
/**
@@ -10210,6 +10233,13 @@ private constructor(
1021010233
*/
1021110234
fun name(): String = name.getRequired("name")
1021210235

10236+
/**
10237+
* This arbitrary value can be deserialized into a custom type using the
10238+
* `convert` method:
10239+
* ```java
10240+
* MyClass myObject = insightParameter.value().convert(MyClass.class);
10241+
* ```
10242+
*/
1021310243
@JsonProperty("value") @ExcludeMissing fun _value(): JsonValue = value
1021410244

1021510245
/**

0 commit comments

Comments
 (0)