diff --git a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java index e1a7061e1e..4f1ccae049 100644 --- a/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java +++ b/clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/model/predict/ModelInstance.java @@ -27,10 +27,10 @@ public class ModelInstance { private String index; @JsonProperty("modelAttributes") - private List modelAttributes = new ArrayList<>(); + private List modelAttributes; @JsonProperty("contentAttributes") - private List contentAttributes = new ArrayList<>(); + private List contentAttributes; @JsonProperty("lastTrained") private String lastTrained; @@ -125,6 +125,9 @@ public ModelInstance setModelAttributes(List modelAttributes) { } public ModelInstance addModelAttributes(ModelAttributes modelAttributesItem) { + if (this.modelAttributes == null) { + this.modelAttributes = new ArrayList<>(); + } this.modelAttributes.add(modelAttributesItem); return this; } @@ -134,7 +137,7 @@ public ModelInstance addModelAttributes(ModelAttributes modelAttributesItem) { * * @return modelAttributes */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getModelAttributes() { return modelAttributes; } @@ -145,6 +148,9 @@ public ModelInstance setContentAttributes(List contentAttributes) { } public ModelInstance addContentAttributes(String contentAttributesItem) { + if (this.contentAttributes == null) { + this.contentAttributes = new ArrayList<>(); + } this.contentAttributes.add(contentAttributesItem); return this; } @@ -154,7 +160,7 @@ public ModelInstance addContentAttributes(String contentAttributesItem) { * * @return contentAttributes */ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getContentAttributes() { return contentAttributes; } diff --git a/clients/algoliasearch-client-javascript/packages/predict/model/modelInstance.ts b/clients/algoliasearch-client-javascript/packages/predict/model/modelInstance.ts index f6e48f77e7..04a32bebc7 100644 --- a/clients/algoliasearch-client-javascript/packages/predict/model/modelInstance.ts +++ b/clients/algoliasearch-client-javascript/packages/predict/model/modelInstance.ts @@ -23,9 +23,9 @@ export type ModelInstance = { index: string; - modelAttributes: ModelAttributes[]; + modelAttributes?: ModelAttributes[]; - contentAttributes: string[]; + contentAttributes?: string[]; /** * The date and time this model instance was last trained. diff --git a/specs/bundled/predict.yml b/specs/bundled/predict.yml index 155fd2c9a9..b8cec65f21 100644 --- a/specs/bundled/predict.yml +++ b/specs/bundled/predict.yml @@ -359,8 +359,6 @@ components: - type - sourceID - index - - modelAttributes - - contentAttributes - lastTrained - lastInference - modelStatus