Skip to content

Commit bb0dfad

Browse files
algolia-botFluf22
andcommitted
fix(specs): add missing redirect property to rule consequence schema (generated)
algolia/api-clients-automation#5934 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Thomas Raffray <[email protected]>
1 parent 7843b1b commit bb0dfad

File tree

2 files changed

+82
-1
lines changed

2 files changed

+82
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public class Consequence {
2727
@JsonProperty("hide")
2828
private List<ConsequenceHide> hide;
2929

30+
@JsonProperty("redirect")
31+
private ConsequenceRedirect redirect;
32+
3033
@JsonProperty("userData")
3134
private Object userData;
3235

@@ -101,6 +104,17 @@ public List<ConsequenceHide> getHide() {
101104
return hide;
102105
}
103106

107+
public Consequence setRedirect(ConsequenceRedirect redirect) {
108+
this.redirect = redirect;
109+
return this;
110+
}
111+
112+
/** Get redirect */
113+
@javax.annotation.Nullable
114+
public ConsequenceRedirect getRedirect() {
115+
return redirect;
116+
}
117+
104118
public Consequence setUserData(Object userData) {
105119
this.userData = userData;
106120
return this;
@@ -129,13 +143,14 @@ public boolean equals(Object o) {
129143
Objects.equals(this.promote, consequence.promote) &&
130144
Objects.equals(this.filterPromotes, consequence.filterPromotes) &&
131145
Objects.equals(this.hide, consequence.hide) &&
146+
Objects.equals(this.redirect, consequence.redirect) &&
132147
Objects.equals(this.userData, consequence.userData)
133148
);
134149
}
135150

136151
@Override
137152
public int hashCode() {
138-
return Objects.hash(params, promote, filterPromotes, hide, userData);
153+
return Objects.hash(params, promote, filterPromotes, hide, redirect, userData);
139154
}
140155

141156
@Override
@@ -146,6 +161,7 @@ public String toString() {
146161
sb.append(" promote: ").append(toIndentedString(promote)).append("\n");
147162
sb.append(" filterPromotes: ").append(toIndentedString(filterPromotes)).append("\n");
148163
sb.append(" hide: ").append(toIndentedString(hide)).append("\n");
164+
sb.append(" redirect: ").append(toIndentedString(redirect)).append("\n");
149165
sb.append(" userData: ").append(toIndentedString(userData)).append("\n");
150166
sb.append("}");
151167
return sb.toString();
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.search;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.Objects;
9+
10+
/**
11+
* Redirect to a virtual replica index. This consequence is only valid for rules with `scope:
12+
* redirect`.
13+
*/
14+
public class ConsequenceRedirect {
15+
16+
@JsonProperty("indexName")
17+
private String indexName;
18+
19+
public ConsequenceRedirect setIndexName(String indexName) {
20+
this.indexName = indexName;
21+
return this;
22+
}
23+
24+
/** Name of the virtual replica index to redirect searches to. */
25+
@javax.annotation.Nonnull
26+
public String getIndexName() {
27+
return indexName;
28+
}
29+
30+
@Override
31+
public boolean equals(Object o) {
32+
if (this == o) {
33+
return true;
34+
}
35+
if (o == null || getClass() != o.getClass()) {
36+
return false;
37+
}
38+
ConsequenceRedirect consequenceRedirect = (ConsequenceRedirect) o;
39+
return Objects.equals(this.indexName, consequenceRedirect.indexName);
40+
}
41+
42+
@Override
43+
public int hashCode() {
44+
return Objects.hash(indexName);
45+
}
46+
47+
@Override
48+
public String toString() {
49+
StringBuilder sb = new StringBuilder();
50+
sb.append("class ConsequenceRedirect {\n");
51+
sb.append(" indexName: ").append(toIndentedString(indexName)).append("\n");
52+
sb.append("}");
53+
return sb.toString();
54+
}
55+
56+
/**
57+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
58+
*/
59+
private String toIndentedString(Object o) {
60+
if (o == null) {
61+
return "null";
62+
}
63+
return o.toString().replace("\n", "\n ");
64+
}
65+
}

0 commit comments

Comments
 (0)