File tree Expand file tree Collapse file tree 5 files changed +15
-17
lines changed
algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict
algoliasearch-client-javascript/packages/predict/model Expand file tree Collapse file tree 5 files changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public class GetModelMetricsResponse {
15
15
private String modelID ;
16
16
17
17
@ JsonProperty ("metrics" )
18
- private List <ModelMetrics > metrics ;
18
+ private List <ModelMetrics > metrics = new ArrayList <>() ;
19
19
20
20
public GetModelMetricsResponse setModelID (String modelID ) {
21
21
this .modelID = modelID ;
@@ -27,7 +27,7 @@ public GetModelMetricsResponse setModelID(String modelID) {
27
27
*
28
28
* @return modelID
29
29
*/
30
- @ javax .annotation .Nullable
30
+ @ javax .annotation .Nonnull
31
31
public String getModelID () {
32
32
return modelID ;
33
33
}
@@ -38,9 +38,6 @@ public GetModelMetricsResponse setMetrics(List<ModelMetrics> metrics) {
38
38
}
39
39
40
40
public GetModelMetricsResponse addMetrics (ModelMetrics metricsItem ) {
41
- if (this .metrics == null ) {
42
- this .metrics = new ArrayList <>();
43
- }
44
41
this .metrics .add (metricsItem );
45
42
return this ;
46
43
}
@@ -50,7 +47,7 @@ public GetModelMetricsResponse addMetrics(ModelMetrics metricsItem) {
50
47
*
51
48
* @return metrics
52
49
*/
53
- @ javax .annotation .Nullable
50
+ @ javax .annotation .Nonnull
54
51
public List <ModelMetrics > getMetrics () {
55
52
return metrics ;
56
53
}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ public class ModelInstance {
18
18
private String name ;
19
19
20
20
@ JsonProperty ("type" )
21
- private String type ;
21
+ private ModelsToRetrieve type ;
22
22
23
23
@ JsonProperty ("sourceID" )
24
24
private String sourceID ;
@@ -74,18 +74,18 @@ public String getName() {
74
74
return name ;
75
75
}
76
76
77
- public ModelInstance setType (String type ) {
77
+ public ModelInstance setType (ModelsToRetrieve type ) {
78
78
this .type = type ;
79
79
return this ;
80
80
}
81
81
82
82
/**
83
- * Type of the model.
83
+ * Get type
84
84
*
85
85
* @return type
86
86
*/
87
87
@ javax .annotation .Nonnull
88
- public String getType () {
88
+ public ModelsToRetrieve getType () {
89
89
return type ;
90
90
}
91
91
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ export type GetModelMetricsResponse = {
6
6
/**
7
7
* The ID of the model.
8
8
*/
9
- modelID ? : string ;
9
+ modelID : string ;
10
10
11
- metrics ? : ModelMetrics [ ] ;
11
+ metrics : ModelMetrics [ ] ;
12
12
} ;
Original file line number Diff line number Diff line change 2
2
3
3
import type { GetModelInstanceConfigStatus } from './getModelInstanceConfigStatus' ;
4
4
import type { ModelAttributes } from './modelAttributes' ;
5
+ import type { ModelsToRetrieve } from './modelsToRetrieve' ;
5
6
6
7
export type ModelInstance = {
7
8
/**
@@ -14,10 +15,7 @@ export type ModelInstance = {
14
15
*/
15
16
name : string ;
16
17
17
- /**
18
- * Type of the model.
19
- */
20
- type : string ;
18
+ type : ModelsToRetrieve ;
21
19
22
20
sourceID : string ;
23
21
Original file line number Diff line number Diff line change @@ -328,7 +328,7 @@ components:
328
328
type : string
329
329
description : Name of model instance.
330
330
type :
331
- type : string
331
+ $ref : ' #/components/schemas/modelsToRetrieve '
332
332
description : Type of the model.
333
333
sourceID :
334
334
type : string
@@ -1160,6 +1160,9 @@ paths:
1160
1160
type : array
1161
1161
items :
1162
1162
$ref : ' #/components/schemas/modelMetrics'
1163
+ required :
1164
+ - modelID
1165
+ - metrics
1163
1166
' 401 ' :
1164
1167
$ref : ' #/components/responses/InvalidCredentials'
1165
1168
' 404 ' :
You can’t perform that action at this time.
0 commit comments