Skip to content

Commit f4c8fff

Browse files
fix(specs): add deprecated field condition in rule schemas (generated)
algolia/api-clients-automation#5983 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Mario-Alexandru Dan <marioalexandrudan@gmail.com>
1 parent 90d11c0 commit f4c8fff

File tree

1 file changed

+18
-2
lines changed
  • algoliasearch/src/main/java/com/algolia/model/search

1 file changed

+18
-2
lines changed

algoliasearch/src/main/java/com/algolia/model/search/Rule.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class Rule {
3636
@JsonProperty("scope")
3737
private String scope;
3838

39+
@JsonProperty("condition")
40+
private Condition condition;
41+
3942
public Rule setObjectID(String objectID) {
4043
this.objectID = objectID;
4144
return this;
@@ -152,6 +155,17 @@ public String getScope() {
152155
return scope;
153156
}
154157

158+
public Rule setCondition(Condition condition) {
159+
this.condition = condition;
160+
return this;
161+
}
162+
163+
/** Get condition */
164+
@javax.annotation.Nullable
165+
public Condition getCondition() {
166+
return condition;
167+
}
168+
155169
@Override
156170
public boolean equals(Object o) {
157171
if (this == o) {
@@ -169,13 +183,14 @@ public boolean equals(Object o) {
169183
Objects.equals(this.enabled, rule.enabled) &&
170184
Objects.equals(this.validity, rule.validity) &&
171185
Objects.equals(this.tags, rule.tags) &&
172-
Objects.equals(this.scope, rule.scope)
186+
Objects.equals(this.scope, rule.scope) &&
187+
Objects.equals(this.condition, rule.condition)
173188
);
174189
}
175190

176191
@Override
177192
public int hashCode() {
178-
return Objects.hash(objectID, conditions, consequence, description, enabled, validity, tags, scope);
193+
return Objects.hash(objectID, conditions, consequence, description, enabled, validity, tags, scope, condition);
179194
}
180195

181196
@Override
@@ -190,6 +205,7 @@ public String toString() {
190205
sb.append(" validity: ").append(toIndentedString(validity)).append("\n");
191206
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
192207
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
208+
sb.append(" condition: ").append(toIndentedString(condition)).append("\n");
193209
sb.append("}");
194210
return sb.toString();
195211
}

0 commit comments

Comments
 (0)