Skip to content

Commit c8b106a

Browse files
algolia-botkai687shortcuts
committed
fix(specs): dictionary entry for stopwords has type property (generated)
algolia/api-clients-automation#3456 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Kai Welke <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent c9a2221 commit c8b106a

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public class DictionaryEntry {
3232
@JsonProperty("state")
3333
private DictionaryEntryState state;
3434

35+
@JsonProperty("type")
36+
private DictionaryEntryType type;
37+
3538
private Map<String, Object> additionalProperties = new HashMap<>();
3639

3740
@JsonAnyGetter
@@ -127,6 +130,17 @@ public DictionaryEntryState getState() {
127130
return state;
128131
}
129132

133+
public DictionaryEntry setType(DictionaryEntryType type) {
134+
this.type = type;
135+
return this;
136+
}
137+
138+
/** Get type */
139+
@javax.annotation.Nullable
140+
public DictionaryEntryType getType() {
141+
return type;
142+
}
143+
130144
@Override
131145
public boolean equals(Object o) {
132146
if (this == o) {
@@ -143,13 +157,14 @@ public boolean equals(Object o) {
143157
Objects.equals(this.words, dictionaryEntry.words) &&
144158
Objects.equals(this.decomposition, dictionaryEntry.decomposition) &&
145159
Objects.equals(this.state, dictionaryEntry.state) &&
160+
Objects.equals(this.type, dictionaryEntry.type) &&
146161
super.equals(o)
147162
);
148163
}
149164

150165
@Override
151166
public int hashCode() {
152-
return Objects.hash(objectID, language, word, words, decomposition, state, super.hashCode());
167+
return Objects.hash(objectID, language, word, words, decomposition, state, type, super.hashCode());
153168
}
154169

155170
@Override
@@ -163,6 +178,7 @@ public String toString() {
163178
sb.append(" words: ").append(toIndentedString(words)).append("\n");
164179
sb.append(" decomposition: ").append(toIndentedString(decomposition)).append("\n");
165180
sb.append(" state: ").append(toIndentedString(state)).append("\n");
181+
sb.append(" type: ").append(toIndentedString(type)).append("\n");
166182
sb.append("}");
167183
return sb.toString();
168184
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
9+
/**
10+
* Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
11+
*/
12+
public enum DictionaryEntryType {
13+
CUSTOM("custom"),
14+
15+
STANDARD("standard");
16+
17+
private final String value;
18+
19+
DictionaryEntryType(String value) {
20+
this.value = value;
21+
}
22+
23+
@JsonValue
24+
public String getValue() {
25+
return value;
26+
}
27+
28+
@Override
29+
public String toString() {
30+
return String.valueOf(value);
31+
}
32+
33+
@JsonCreator
34+
public static DictionaryEntryType fromValue(String value) {
35+
for (DictionaryEntryType b : DictionaryEntryType.values()) {
36+
if (b.value.equals(value)) {
37+
return b;
38+
}
39+
}
40+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
41+
}
42+
}

0 commit comments

Comments
 (0)