Skip to content

Commit

Permalink
chore: generated code for commit fcf0330.
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot and shortcuts committed Apr 12, 2022
1 parent fcf0330 commit 72ff5e3
Show file tree
Hide file tree
Showing 77 changed files with 1,082 additions and 1,953 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

/** Gets or Sets advancedSyntaxFeatures */
@JsonAdapter(AdvancedSyntaxFeatures.Adapter.class)
public enum AdvancedSyntaxFeatures {
EXACT_PHRASE("exactPhrase"),

EXCLUDE_WORDS("excludeWords");

private final String value;

AdvancedSyntaxFeatures(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static AdvancedSyntaxFeatures fromValue(String value) {
for (AdvancedSyntaxFeatures b : AdvancedSyntaxFeatures.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<AdvancedSyntaxFeatures> {

@Override
public void write(
final JsonWriter jsonWriter,
final AdvancedSyntaxFeatures enumeration
) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public AdvancedSyntaxFeatures read(final JsonReader jsonReader)
throws IOException {
String value = jsonReader.nextString();
return AdvancedSyntaxFeatures.fromValue(value);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

/** Gets or Sets alternativesAsExact */
@JsonAdapter(AlternativesAsExact.Adapter.class)
public enum AlternativesAsExact {
IGNORE_PLURALS("ignorePlurals"),

SINGLE_WORD_SYNONYM("singleWordSynonym"),

MULTI_WORDS_SYNONYM("multiWordsSynonym");

private final String value;

AlternativesAsExact(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static AlternativesAsExact fromValue(String value) {
for (AlternativesAsExact b : AlternativesAsExact.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<AlternativesAsExact> {

@Override
public void write(
final JsonWriter jsonWriter,
final AlternativesAsExact enumeration
) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public AlternativesAsExact read(final JsonReader jsonReader)
throws IOException {
String value = jsonReader.nextString();
return AlternativesAsExact.fromValue(value);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
@JsonAdapter(AroundRadius.Adapter.class)
public abstract class AroundRadius implements CompoundType {

public static AroundRadius ofAroundRadiusOneOf(AroundRadiusOneOf inside) {
return new AroundRadiusAroundRadiusOneOf(inside);
public static AroundRadius ofAroundRadiusAll(AroundRadiusAll inside) {
return new AroundRadiusAroundRadiusAll(inside);
}

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

@JsonAdapter(AroundRadius.Adapter.class)
class AroundRadiusAroundRadiusOneOf extends AroundRadius {
class AroundRadiusAroundRadiusAll extends AroundRadius {

private final AroundRadiusOneOf insideValue;
private final AroundRadiusAll insideValue;

AroundRadiusAroundRadiusOneOf(AroundRadiusOneOf insideValue) {
AroundRadiusAroundRadiusAll(AroundRadiusAll insideValue) {
this.insideValue = insideValue;
}

@Override
public AroundRadiusOneOf getInsideValue() {
public AroundRadiusAll getInsideValue() {
return insideValue;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.algolia.model.search;

import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

/** Gets or Sets aroundRadiusAll */
@JsonAdapter(AroundRadiusAll.Adapter.class)
public enum AroundRadiusAll {
ALL("all");

private final String value;

AroundRadiusAll(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static AroundRadiusAll fromValue(String value) {
for (AroundRadiusAll b : AroundRadiusAll.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}

public static class Adapter extends TypeAdapter<AroundRadiusAll> {

@Override
public void write(
final JsonWriter jsonWriter,
final AroundRadiusAll enumeration
) throws IOException {
jsonWriter.value(enumeration.getValue());
}

@Override
public AroundRadiusAll read(final JsonReader jsonReader)
throws IOException {
String value = jsonReader.nextString();
return AroundRadiusAll.fromValue(value);
}
}
}
Loading

0 comments on commit 72ff5e3

Please sign in to comment.