Skip to content

Commit 1a23b2c

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

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public class ModelInstance {
2727
private String index;
2828

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

3232
@JsonProperty("contentAttributes")
33-
private List<String> contentAttributes = new ArrayList<>();
33+
private List<String> contentAttributes;
3434

3535
@JsonProperty("lastTrained")
3636
private String lastTrained;
@@ -125,6 +125,9 @@ public ModelInstance setModelAttributes(List<ModelAttributes> modelAttributes) {
125125
}
126126

127127
public ModelInstance addModelAttributes(ModelAttributes modelAttributesItem) {
128+
if (this.modelAttributes == null) {
129+
this.modelAttributes = new ArrayList<>();
130+
}
128131
this.modelAttributes.add(modelAttributesItem);
129132
return this;
130133
}
@@ -134,7 +137,7 @@ public ModelInstance addModelAttributes(ModelAttributes modelAttributesItem) {
134137
*
135138
* @return modelAttributes
136139
*/
137-
@javax.annotation.Nonnull
140+
@javax.annotation.Nullable
138141
public List<ModelAttributes> getModelAttributes() {
139142
return modelAttributes;
140143
}
@@ -145,6 +148,9 @@ public ModelInstance setContentAttributes(List<String> contentAttributes) {
145148
}
146149

147150
public ModelInstance addContentAttributes(String contentAttributesItem) {
151+
if (this.contentAttributes == null) {
152+
this.contentAttributes = new ArrayList<>();
153+
}
148154
this.contentAttributes.add(contentAttributesItem);
149155
return this;
150156
}
@@ -154,7 +160,7 @@ public ModelInstance addContentAttributes(String contentAttributesItem) {
154160
*
155161
* @return contentAttributes
156162
*/
157-
@javax.annotation.Nonnull
163+
@javax.annotation.Nullable
158164
public List<String> getContentAttributes() {
159165
return contentAttributes;
160166
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export type ModelInstance = {
2323

2424
index: string;
2525

26-
modelAttributes: ModelAttributes[];
26+
modelAttributes?: ModelAttributes[];
2727

28-
contentAttributes: string[];
28+
contentAttributes?: string[];
2929

3030
/**
3131
* The date and time this model instance was last trained.

specs/bundled/predict.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,6 @@ components:
359359
- type
360360
- sourceID
361361
- index
362-
- modelAttributes
363-
- contentAttributes
364362
- lastTrained
365363
- lastInference
366364
- modelStatus

0 commit comments

Comments
 (0)