Skip to content

Commit 72ff5e3

Browse files
chore: generated code for commit fcf0330.
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent fcf0330 commit 72ff5e3

File tree

77 files changed

+1082
-1953
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1082
-1953
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
package com.algolia.model.search;
2+
3+
import com.google.gson.TypeAdapter;
4+
import com.google.gson.annotations.JsonAdapter;
5+
import com.google.gson.stream.JsonReader;
6+
import com.google.gson.stream.JsonWriter;
7+
import java.io.IOException;
8+
9+
/** Gets or Sets advancedSyntaxFeatures */
10+
@JsonAdapter(AdvancedSyntaxFeatures.Adapter.class)
11+
public enum AdvancedSyntaxFeatures {
12+
EXACT_PHRASE("exactPhrase"),
13+
14+
EXCLUDE_WORDS("excludeWords");
15+
16+
private final String value;
17+
18+
AdvancedSyntaxFeatures(String value) {
19+
this.value = value;
20+
}
21+
22+
public String getValue() {
23+
return value;
24+
}
25+
26+
@Override
27+
public String toString() {
28+
return String.valueOf(value);
29+
}
30+
31+
public static AdvancedSyntaxFeatures fromValue(String value) {
32+
for (AdvancedSyntaxFeatures b : AdvancedSyntaxFeatures.values()) {
33+
if (b.value.equals(value)) {
34+
return b;
35+
}
36+
}
37+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
38+
}
39+
40+
public static class Adapter extends TypeAdapter<AdvancedSyntaxFeatures> {
41+
42+
@Override
43+
public void write(
44+
final JsonWriter jsonWriter,
45+
final AdvancedSyntaxFeatures enumeration
46+
) throws IOException {
47+
jsonWriter.value(enumeration.getValue());
48+
}
49+
50+
@Override
51+
public AdvancedSyntaxFeatures read(final JsonReader jsonReader)
52+
throws IOException {
53+
String value = jsonReader.nextString();
54+
return AdvancedSyntaxFeatures.fromValue(value);
55+
}
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package com.algolia.model.search;
2+
3+
import com.google.gson.TypeAdapter;
4+
import com.google.gson.annotations.JsonAdapter;
5+
import com.google.gson.stream.JsonReader;
6+
import com.google.gson.stream.JsonWriter;
7+
import java.io.IOException;
8+
9+
/** Gets or Sets alternativesAsExact */
10+
@JsonAdapter(AlternativesAsExact.Adapter.class)
11+
public enum AlternativesAsExact {
12+
IGNORE_PLURALS("ignorePlurals"),
13+
14+
SINGLE_WORD_SYNONYM("singleWordSynonym"),
15+
16+
MULTI_WORDS_SYNONYM("multiWordsSynonym");
17+
18+
private final String value;
19+
20+
AlternativesAsExact(String value) {
21+
this.value = value;
22+
}
23+
24+
public String getValue() {
25+
return value;
26+
}
27+
28+
@Override
29+
public String toString() {
30+
return String.valueOf(value);
31+
}
32+
33+
public static AlternativesAsExact fromValue(String value) {
34+
for (AlternativesAsExact b : AlternativesAsExact.values()) {
35+
if (b.value.equals(value)) {
36+
return b;
37+
}
38+
}
39+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
40+
}
41+
42+
public static class Adapter extends TypeAdapter<AlternativesAsExact> {
43+
44+
@Override
45+
public void write(
46+
final JsonWriter jsonWriter,
47+
final AlternativesAsExact enumeration
48+
) throws IOException {
49+
jsonWriter.value(enumeration.getValue());
50+
}
51+
52+
@Override
53+
public AlternativesAsExact read(final JsonReader jsonReader)
54+
throws IOException {
55+
String value = jsonReader.nextString();
56+
return AlternativesAsExact.fromValue(value);
57+
}
58+
}
59+
}

clients/algoliasearch-client-java-2/algoliasearch-core/com/algolia/model/search/AroundRadius.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
@JsonAdapter(AroundRadius.Adapter.class)
1313
public abstract class AroundRadius implements CompoundType {
1414

15-
public static AroundRadius ofAroundRadiusOneOf(AroundRadiusOneOf inside) {
16-
return new AroundRadiusAroundRadiusOneOf(inside);
15+
public static AroundRadius ofAroundRadiusAll(AroundRadiusAll inside) {
16+
return new AroundRadiusAroundRadiusAll(inside);
1717
}
1818

1919
public static AroundRadius ofInteger(Integer inside) {
@@ -39,16 +39,16 @@ public AroundRadius read(final JsonReader jsonReader) throws IOException {
3939
}
4040

4141
@JsonAdapter(AroundRadius.Adapter.class)
42-
class AroundRadiusAroundRadiusOneOf extends AroundRadius {
42+
class AroundRadiusAroundRadiusAll extends AroundRadius {
4343

44-
private final AroundRadiusOneOf insideValue;
44+
private final AroundRadiusAll insideValue;
4545

46-
AroundRadiusAroundRadiusOneOf(AroundRadiusOneOf insideValue) {
46+
AroundRadiusAroundRadiusAll(AroundRadiusAll insideValue) {
4747
this.insideValue = insideValue;
4848
}
4949

5050
@Override
51-
public AroundRadiusOneOf getInsideValue() {
51+
public AroundRadiusAll getInsideValue() {
5252
return insideValue;
5353
}
5454
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package com.algolia.model.search;
2+
3+
import com.google.gson.TypeAdapter;
4+
import com.google.gson.annotations.JsonAdapter;
5+
import com.google.gson.stream.JsonReader;
6+
import com.google.gson.stream.JsonWriter;
7+
import java.io.IOException;
8+
9+
/** Gets or Sets aroundRadiusAll */
10+
@JsonAdapter(AroundRadiusAll.Adapter.class)
11+
public enum AroundRadiusAll {
12+
ALL("all");
13+
14+
private final String value;
15+
16+
AroundRadiusAll(String value) {
17+
this.value = value;
18+
}
19+
20+
public String getValue() {
21+
return value;
22+
}
23+
24+
@Override
25+
public String toString() {
26+
return String.valueOf(value);
27+
}
28+
29+
public static AroundRadiusAll fromValue(String value) {
30+
for (AroundRadiusAll b : AroundRadiusAll.values()) {
31+
if (b.value.equals(value)) {
32+
return b;
33+
}
34+
}
35+
throw new IllegalArgumentException("Unexpected value '" + value + "'");
36+
}
37+
38+
public static class Adapter extends TypeAdapter<AroundRadiusAll> {
39+
40+
@Override
41+
public void write(
42+
final JsonWriter jsonWriter,
43+
final AroundRadiusAll enumeration
44+
) throws IOException {
45+
jsonWriter.value(enumeration.getValue());
46+
}
47+
48+
@Override
49+
public AroundRadiusAll read(final JsonReader jsonReader)
50+
throws IOException {
51+
String value = jsonReader.nextString();
52+
return AroundRadiusAll.fromValue(value);
53+
}
54+
}
55+
}

0 commit comments

Comments
 (0)