Skip to content

Commit f377f65

Browse files
algolia-botwriteensshortcuts
committed
chore: generated code for commit fc7f987. [skip ci]
Co-authored-by: Adewusi Victor <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent fc7f987 commit f377f65

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/GetModelMetricsResponse.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class GetModelMetricsResponse {
1515
private String modelID;
1616

1717
@JsonProperty("metrics")
18-
private List<ModelMetrics> metrics;
18+
private List<ModelMetrics> metrics = new ArrayList<>();
1919

2020
public GetModelMetricsResponse setModelID(String modelID) {
2121
this.modelID = modelID;
@@ -27,7 +27,7 @@ public GetModelMetricsResponse setModelID(String modelID) {
2727
*
2828
* @return modelID
2929
*/
30-
@javax.annotation.Nullable
30+
@javax.annotation.Nonnull
3131
public String getModelID() {
3232
return modelID;
3333
}
@@ -38,9 +38,6 @@ public GetModelMetricsResponse setMetrics(List<ModelMetrics> metrics) {
3838
}
3939

4040
public GetModelMetricsResponse addMetrics(ModelMetrics metricsItem) {
41-
if (this.metrics == null) {
42-
this.metrics = new ArrayList<>();
43-
}
4441
this.metrics.add(metricsItem);
4542
return this;
4643
}
@@ -50,7 +47,7 @@ public GetModelMetricsResponse addMetrics(ModelMetrics metricsItem) {
5047
*
5148
* @return metrics
5249
*/
53-
@javax.annotation.Nullable
50+
@javax.annotation.Nonnull
5451
public List<ModelMetrics> getMetrics() {
5552
return metrics;
5653
}

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class ModelInstance {
1818
private String name;
1919

2020
@JsonProperty("type")
21-
private String type;
21+
private ModelsToRetrieve type;
2222

2323
@JsonProperty("sourceID")
2424
private String sourceID;
@@ -74,18 +74,18 @@ public String getName() {
7474
return name;
7575
}
7676

77-
public ModelInstance setType(String type) {
77+
public ModelInstance setType(ModelsToRetrieve type) {
7878
this.type = type;
7979
return this;
8080
}
8181

8282
/**
83-
* Type of the model.
83+
* Get type
8484
*
8585
* @return type
8686
*/
8787
@javax.annotation.Nonnull
88-
public String getType() {
88+
public ModelsToRetrieve getType() {
8989
return type;
9090
}
9191

clients/algoliasearch-client-javascript/packages/predict/model/getModelMetricsResponse.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type GetModelMetricsResponse = {
66
/**
77
* The ID of the model.
88
*/
9-
modelID?: string;
9+
modelID: string;
1010

11-
metrics?: ModelMetrics[];
11+
metrics: ModelMetrics[];
1212
};

clients/algoliasearch-client-javascript/packages/predict/model/modelInstance.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import type { GetModelInstanceConfigStatus } from './getModelInstanceConfigStatus';
44
import type { ModelAttributes } from './modelAttributes';
5+
import type { ModelsToRetrieve } from './modelsToRetrieve';
56

67
export type ModelInstance = {
78
/**
@@ -14,10 +15,7 @@ export type ModelInstance = {
1415
*/
1516
name: string;
1617

17-
/**
18-
* Type of the model.
19-
*/
20-
type: string;
18+
type: ModelsToRetrieve;
2119

2220
sourceID: string;
2321

specs/bundled/predict.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ components:
328328
type: string
329329
description: Name of model instance.
330330
type:
331-
type: string
331+
$ref: '#/components/schemas/modelsToRetrieve'
332332
description: Type of the model.
333333
sourceID:
334334
type: string
@@ -1160,6 +1160,9 @@ paths:
11601160
type: array
11611161
items:
11621162
$ref: '#/components/schemas/modelMetrics'
1163+
required:
1164+
- modelID
1165+
- metrics
11631166
'401':
11641167
$ref: '#/components/responses/InvalidCredentials'
11651168
'404':

0 commit comments

Comments
 (0)