Skip to content

Commit 45a9727

Browse files
algolia-botwriteens
andcommitted
chore: generated code for commit 6ba25e2. [skip ci]
Co-authored-by: Adewusi Victor <[email protected]>
1 parent 6ba25e2 commit 45a9727

File tree

16 files changed

+230
-121
lines changed

16 files changed

+230
-121
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ private static List<StatefulHost> getDefaultHosts(String region) throws AlgoliaR
6363

6464
/**
6565
* Activate an existing model template. This action triggers the training and inference pipelines
66-
* for the selected model. The model is added with `status=pending`. If a model with the exact
67-
* same source & index already exists, the API endpoint returns an error.
66+
* for the selected model. The model is added with `modelStatus=pending`. If a model with the
67+
* exact same source & index already exists, the API endpoint returns an error.
6868
*
6969
* @param activateModelParams (required)
7070
* @param requestOptions The requestOptions to send along with the query, they will be merged with
@@ -79,8 +79,8 @@ public ActivateModelInstanceResponse activateModelInstance(ActivateModelParams a
7979

8080
/**
8181
* Activate an existing model template. This action triggers the training and inference pipelines
82-
* for the selected model. The model is added with `status=pending`. If a model with the exact
83-
* same source & index already exists, the API endpoint returns an error.
82+
* for the selected model. The model is added with `modelStatus=pending`. If a model with the
83+
* exact same source & index already exists, the API endpoint returns an error.
8484
*
8585
* @param activateModelParams (required)
8686
* @return ActivateModelInstanceResponse
@@ -93,7 +93,7 @@ public ActivateModelInstanceResponse activateModelInstance(ActivateModelParams a
9393
/**
9494
* (asynchronously) Activate an existing model template. This action triggers the training and
9595
* inference pipelines for the selected model. The model is added with
96-
* &#x60;status&#x3D;pending&#x60;. If a model with the exact same source &amp; index already
96+
* &#x60;modelStatus&#x3D;pending&#x60;. If a model with the exact same source &amp; index already
9797
* exists, the API endpoint returns an error.
9898
*
9999
* @param activateModelParams (required)
@@ -125,7 +125,7 @@ public CompletableFuture<ActivateModelInstanceResponse> activateModelInstanceAsy
125125
/**
126126
* (asynchronously) Activate an existing model template. This action triggers the training and
127127
* inference pipelines for the selected model. The model is added with
128-
* &#x60;status&#x3D;pending&#x60;. If a model with the exact same source &amp; index already
128+
* &#x60;modelStatus&#x3D;pending&#x60;. If a model with the exact same source &amp; index already
129129
* exists, the API endpoint returns an error.
130130
*
131131
* @param activateModelParams (required)

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public class ActivateModelParams {
2323
@JsonProperty("index")
2424
private String index;
2525

26-
@JsonProperty("affinities")
27-
private List<String> affinities;
26+
@JsonProperty("modelAttributes")
27+
private List<String> modelAttributes;
2828

2929
@JsonProperty("contentAttributes")
3030
private List<String> contentAttributes;
@@ -89,27 +89,27 @@ public String getIndex() {
8989
return index;
9090
}
9191

92-
public ActivateModelParams setAffinities(List<String> affinities) {
93-
this.affinities = affinities;
92+
public ActivateModelParams setModelAttributes(List<String> modelAttributes) {
93+
this.modelAttributes = modelAttributes;
9494
return this;
9595
}
9696

97-
public ActivateModelParams addAffinities(String affinitiesItem) {
98-
if (this.affinities == null) {
99-
this.affinities = new ArrayList<>();
97+
public ActivateModelParams addModelAttributes(String modelAttributesItem) {
98+
if (this.modelAttributes == null) {
99+
this.modelAttributes = new ArrayList<>();
100100
}
101-
this.affinities.add(affinitiesItem);
101+
this.modelAttributes.add(modelAttributesItem);
102102
return this;
103103
}
104104

105105
/**
106-
* Get affinities
106+
* Get modelAttributes
107107
*
108-
* @return affinities
108+
* @return modelAttributes
109109
*/
110110
@javax.annotation.Nullable
111-
public List<String> getAffinities() {
112-
return affinities;
111+
public List<String> getModelAttributes() {
112+
return modelAttributes;
113113
}
114114

115115
public ActivateModelParams setContentAttributes(List<String> contentAttributes) {
@@ -149,14 +149,14 @@ public boolean equals(Object o) {
149149
Objects.equals(this.name, activateModelParams.name) &&
150150
Objects.equals(this.sourceID, activateModelParams.sourceID) &&
151151
Objects.equals(this.index, activateModelParams.index) &&
152-
Objects.equals(this.affinities, activateModelParams.affinities) &&
152+
Objects.equals(this.modelAttributes, activateModelParams.modelAttributes) &&
153153
Objects.equals(this.contentAttributes, activateModelParams.contentAttributes)
154154
);
155155
}
156156

157157
@Override
158158
public int hashCode() {
159-
return Objects.hash(type, name, sourceID, index, affinities, contentAttributes);
159+
return Objects.hash(type, name, sourceID, index, modelAttributes, contentAttributes);
160160
}
161161

162162
@Override
@@ -167,7 +167,7 @@ public String toString() {
167167
sb.append(" name: ").append(toIndentedString(name)).append("\n");
168168
sb.append(" sourceID: ").append(toIndentedString(sourceID)).append("\n");
169169
sb.append(" index: ").append(toIndentedString(index)).append("\n");
170-
sb.append(" affinities: ").append(toIndentedString(affinities)).append("\n");
170+
sb.append(" modelAttributes: ").append(toIndentedString(modelAttributes)).append("\n");
171171
sb.append(" contentAttributes: ").append(toIndentedString(contentAttributes)).append("\n");
172172
sb.append("}");
173173
return sb.toString();
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+
/** ModelAttributes */
12+
public class ModelAttributes {
13+
14+
@JsonProperty("name")
15+
private String name;
16+
17+
@JsonProperty("values")
18+
private List<String> values;
19+
20+
public ModelAttributes setName(String name) {
21+
this.name = name;
22+
return this;
23+
}
24+
25+
/**
26+
* Get name
27+
*
28+
* @return name
29+
*/
30+
@javax.annotation.Nonnull
31+
public String getName() {
32+
return name;
33+
}
34+
35+
public ModelAttributes setValues(List<String> values) {
36+
this.values = values;
37+
return this;
38+
}
39+
40+
public ModelAttributes addValues(String valuesItem) {
41+
if (this.values == null) {
42+
this.values = new ArrayList<>();
43+
}
44+
this.values.add(valuesItem);
45+
return this;
46+
}
47+
48+
/**
49+
* Get values
50+
*
51+
* @return values
52+
*/
53+
@javax.annotation.Nullable
54+
public List<String> getValues() {
55+
return values;
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+
ModelAttributes modelAttributes = (ModelAttributes) o;
67+
return Objects.equals(this.name, modelAttributes.name) && Objects.equals(this.values, modelAttributes.values);
68+
}
69+
70+
@Override
71+
public int hashCode() {
72+
return Objects.hash(name, values);
73+
}
74+
75+
@Override
76+
public String toString() {
77+
StringBuilder sb = new StringBuilder();
78+
sb.append("class ModelAttributes {\n");
79+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
80+
sb.append(" values: ").append(toIndentedString(values)).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+
}

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

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public class ModelInstance {
2626
@JsonProperty("index")
2727
private String index;
2828

29-
@JsonProperty("affinities")
30-
private List<String> affinities = new ArrayList<>();
29+
@JsonProperty("modelAttributes")
30+
private ModelAttributes modelAttributes;
3131

3232
@JsonProperty("contentAttributes")
3333
private List<String> contentAttributes = new ArrayList<>();
@@ -119,24 +119,19 @@ public String getIndex() {
119119
return index;
120120
}
121121

122-
public ModelInstance setAffinities(List<String> affinities) {
123-
this.affinities = affinities;
124-
return this;
125-
}
126-
127-
public ModelInstance addAffinities(String affinitiesItem) {
128-
this.affinities.add(affinitiesItem);
122+
public ModelInstance setModelAttributes(ModelAttributes modelAttributes) {
123+
this.modelAttributes = modelAttributes;
129124
return this;
130125
}
131126

132127
/**
133-
* Get affinities
128+
* Get modelAttributes
134129
*
135-
* @return affinities
130+
* @return modelAttributes
136131
*/
137132
@javax.annotation.Nonnull
138-
public List<String> getAffinities() {
139-
return affinities;
133+
public ModelAttributes getModelAttributes() {
134+
return modelAttributes;
140135
}
141136

142137
public ModelInstance setContentAttributes(List<String> contentAttributes) {
@@ -214,7 +209,7 @@ public ModelInstance setModelStatus(GetModelInstanceConfigStatus modelStatus) {
214209
*
215210
* @return modelStatus
216211
*/
217-
@javax.annotation.Nullable
212+
@javax.annotation.Nonnull
218213
public GetModelInstanceConfigStatus getModelStatus() {
219214
return modelStatus;
220215
}
@@ -234,7 +229,7 @@ public boolean equals(Object o) {
234229
Objects.equals(this.type, modelInstance.type) &&
235230
Objects.equals(this.sourceID, modelInstance.sourceID) &&
236231
Objects.equals(this.index, modelInstance.index) &&
237-
Objects.equals(this.affinities, modelInstance.affinities) &&
232+
Objects.equals(this.modelAttributes, modelInstance.modelAttributes) &&
238233
Objects.equals(this.contentAttributes, modelInstance.contentAttributes) &&
239234
Objects.equals(this.lastTrained, modelInstance.lastTrained) &&
240235
Objects.equals(this.lastInference, modelInstance.lastInference) &&
@@ -251,7 +246,7 @@ public int hashCode() {
251246
type,
252247
sourceID,
253248
index,
254-
affinities,
249+
modelAttributes,
255250
contentAttributes,
256251
lastTrained,
257252
lastInference,
@@ -269,7 +264,7 @@ public String toString() {
269264
sb.append(" type: ").append(toIndentedString(type)).append("\n");
270265
sb.append(" sourceID: ").append(toIndentedString(sourceID)).append("\n");
271266
sb.append(" index: ").append(toIndentedString(index)).append("\n");
272-
sb.append(" affinities: ").append(toIndentedString(affinities)).append("\n");
267+
sb.append(" modelAttributes: ").append(toIndentedString(modelAttributes)).append("\n");
273268
sb.append(" contentAttributes: ").append(toIndentedString(contentAttributes)).append("\n");
274269
sb.append(" lastTrained: ").append(toIndentedString(lastTrained)).append("\n");
275270
sb.append(" lastInference: ").append(toIndentedString(lastInference)).append("\n");
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
* current status of the model is `inactive`. \\ `inactive` - model training and inference have been
1313
* paused. The inactive value is allowed only if the current status of the model is `active`.
1414
*/
15-
public enum Status {
15+
public enum ModelStatus {
1616
ACTIVE("active"),
1717

1818
INACTIVE("inactive");
1919

2020
private final String value;
2121

22-
Status(String value) {
22+
ModelStatus(String value) {
2323
this.value = value;
2424
}
2525

@@ -34,8 +34,8 @@ public String toString() {
3434
}
3535

3636
@JsonCreator
37-
public static Status fromValue(String value) {
38-
for (Status b : Status.values()) {
37+
public static ModelStatus fromValue(String value) {
38+
for (ModelStatus b : ModelStatus.values()) {
3939
if (b.value.equals(value)) {
4040
return b;
4141
}

0 commit comments

Comments
 (0)