Skip to content

Commit a30047f

Browse files
algolia-botwriteens
andcommitted
chore: generated code for commit e84584dd. [skip ci]
algolia/api-clients-automation@e84584d Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Adewusi Victor <[email protected]>
1 parent 99118b0 commit a30047f

File tree

2 files changed

+103
-9
lines changed

2 files changed

+103
-9
lines changed

algoliasearch-core/src/main/java/com/algolia/api/PredictClient.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,21 +1162,21 @@ public CompletableFuture<List<ModelInstance>> getModelInstancesAsync() throws Al
11621162
* @param modelID The ID of the model to retrieve. (required)
11631163
* @param requestOptions The requestOptions to send along with the query, they will be merged with
11641164
* the transporter requestOptions.
1165-
* @return List<ModelMetrics>
1165+
* @return GetModelMetricsResponse
11661166
* @throws AlgoliaRuntimeException If it fails to process the API call
11671167
*/
1168-
public List<ModelMetrics> getModelMetrics(String modelID, RequestOptions requestOptions) throws AlgoliaRuntimeException {
1168+
public GetModelMetricsResponse getModelMetrics(String modelID, RequestOptions requestOptions) throws AlgoliaRuntimeException {
11691169
return LaunderThrowable.await(getModelMetricsAsync(modelID, requestOptions));
11701170
}
11711171

11721172
/**
11731173
* Get the model instance’ training metrics.
11741174
*
11751175
* @param modelID The ID of the model to retrieve. (required)
1176-
* @return List<ModelMetrics>
1176+
* @return GetModelMetricsResponse
11771177
* @throws AlgoliaRuntimeException If it fails to process the API call
11781178
*/
1179-
public List<ModelMetrics> getModelMetrics(String modelID) throws AlgoliaRuntimeException {
1179+
public GetModelMetricsResponse getModelMetrics(String modelID) throws AlgoliaRuntimeException {
11801180
return this.getModelMetrics(modelID, null);
11811181
}
11821182

@@ -1186,10 +1186,10 @@ public List<ModelMetrics> getModelMetrics(String modelID) throws AlgoliaRuntimeE
11861186
* @param modelID The ID of the model to retrieve. (required)
11871187
* @param requestOptions The requestOptions to send along with the query, they will be merged with
11881188
* the transporter requestOptions.
1189-
* @return CompletableFuture<List<ModelMetrics>> The awaitable future
1189+
* @return CompletableFuture<GetModelMetricsResponse> The awaitable future
11901190
* @throws AlgoliaRuntimeException If it fails to process the API call
11911191
*/
1192-
public CompletableFuture<List<ModelMetrics>> getModelMetricsAsync(String modelID, RequestOptions requestOptions)
1192+
public CompletableFuture<GetModelMetricsResponse> getModelMetricsAsync(String modelID, RequestOptions requestOptions)
11931193
throws AlgoliaRuntimeException {
11941194
if (modelID == null) {
11951195
throw new AlgoliaRuntimeException("Parameter `modelID` is required when calling `getModelMetrics`.");
@@ -1204,17 +1204,17 @@ public CompletableFuture<List<ModelMetrics>> getModelMetricsAsync(String modelID
12041204
Map<String, String> headers = new HashMap<String, String>();
12051205

12061206
Call call = this.buildCall(requestPath, "GET", queryParameters, bodyObj, headers, requestOptions, false);
1207-
return this.executeAsync(call, new TypeReference<List<ModelMetrics>>() {});
1207+
return this.executeAsync(call, new TypeReference<GetModelMetricsResponse>() {});
12081208
}
12091209

12101210
/**
12111211
* (asynchronously) Get the model instance’ training metrics.
12121212
*
12131213
* @param modelID The ID of the model to retrieve. (required)
1214-
* @return CompletableFuture<List<ModelMetrics>> The awaitable future
1214+
* @return CompletableFuture<GetModelMetricsResponse> The awaitable future
12151215
* @throws AlgoliaRuntimeException If it fails to process the API call
12161216
*/
1217-
public CompletableFuture<List<ModelMetrics>> getModelMetricsAsync(String modelID) throws AlgoliaRuntimeException {
1217+
public CompletableFuture<GetModelMetricsResponse> getModelMetricsAsync(String modelID) throws AlgoliaRuntimeException {
12181218
return this.getModelMetricsAsync(modelID, null);
12191219
}
12201220

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
// This file is generated, manual changes will be lost - read more on
2+
// https://github.com/algolia/api-clients-automation.
3+
4+
package com.algolia.model.predict;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import java.util.ArrayList;
8+
import java.util.List;
9+
import java.util.Objects;
10+
11+
/** GetModelMetricsResponse */
12+
public class GetModelMetricsResponse {
13+
14+
@JsonProperty("modelID")
15+
private String modelID;
16+
17+
@JsonProperty("metrics")
18+
private List<ModelMetrics> metrics;
19+
20+
public GetModelMetricsResponse setModelID(String modelID) {
21+
this.modelID = modelID;
22+
return this;
23+
}
24+
25+
/**
26+
* The ID of the model.
27+
*
28+
* @return modelID
29+
*/
30+
@javax.annotation.Nullable
31+
public String getModelID() {
32+
return modelID;
33+
}
34+
35+
public GetModelMetricsResponse setMetrics(List<ModelMetrics> metrics) {
36+
this.metrics = metrics;
37+
return this;
38+
}
39+
40+
public GetModelMetricsResponse addMetrics(ModelMetrics metricsItem) {
41+
if (this.metrics == null) {
42+
this.metrics = new ArrayList<>();
43+
}
44+
this.metrics.add(metricsItem);
45+
return this;
46+
}
47+
48+
/**
49+
* Get metrics
50+
*
51+
* @return metrics
52+
*/
53+
@javax.annotation.Nullable
54+
public List<ModelMetrics> getMetrics() {
55+
return metrics;
56+
}
57+
58+
@Override
59+
public boolean equals(Object o) {
60+
if (this == o) {
61+
return true;
62+
}
63+
if (o == null || getClass() != o.getClass()) {
64+
return false;
65+
}
66+
GetModelMetricsResponse getModelMetricsResponse = (GetModelMetricsResponse) o;
67+
return Objects.equals(this.modelID, getModelMetricsResponse.modelID) && Objects.equals(this.metrics, getModelMetricsResponse.metrics);
68+
}
69+
70+
@Override
71+
public int hashCode() {
72+
return Objects.hash(modelID, metrics);
73+
}
74+
75+
@Override
76+
public String toString() {
77+
StringBuilder sb = new StringBuilder();
78+
sb.append("class GetModelMetricsResponse {\n");
79+
sb.append(" modelID: ").append(toIndentedString(modelID)).append("\n");
80+
sb.append(" metrics: ").append(toIndentedString(metrics)).append("\n");
81+
sb.append("}");
82+
return sb.toString();
83+
}
84+
85+
/**
86+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
87+
*/
88+
private String toIndentedString(Object o) {
89+
if (o == null) {
90+
return "null";
91+
}
92+
return o.toString().replace("\n", "\n ");
93+
}
94+
}

0 commit comments

Comments
 (0)