-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: generated code for commit 2838123. [skip ci]
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
- Loading branch information
1 parent
2838123
commit c6568b5
Showing
77 changed files
with
5,417 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
...search-client-java-2/algoliasearch-core/src/com/algolia/model/recommend/FacetFilters.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.algolia.model.recommend; | ||
|
||
import com.algolia.JSON; | ||
import com.algolia.utils.CompoundType; | ||
import com.google.gson.TypeAdapter; | ||
import com.google.gson.annotations.JsonAdapter; | ||
import com.google.gson.reflect.TypeToken; | ||
import com.google.gson.stream.JsonReader; | ||
import com.google.gson.stream.JsonWriter; | ||
import java.io.IOException; | ||
import java.util.List; | ||
|
||
@JsonAdapter(FacetFilters.Adapter.class) | ||
public abstract class FacetFilters implements CompoundType { | ||
|
||
public static FacetFilters ofListListString(List<List<String>> inside) { | ||
return new FacetFiltersListListString(inside); | ||
} | ||
|
||
public static FacetFilters ofListString(List<String> inside) { | ||
return new FacetFiltersListString(inside); | ||
} | ||
|
||
public static class Adapter extends TypeAdapter<FacetFilters> { | ||
|
||
@Override | ||
public void write(final JsonWriter out, final FacetFilters oneOf) | ||
throws IOException { | ||
TypeAdapter runtimeTypeAdapter = (TypeAdapter) JSON | ||
.getGson() | ||
.getAdapter(TypeToken.get(oneOf.getInsideValue().getClass())); | ||
runtimeTypeAdapter.write(out, oneOf.getInsideValue()); | ||
} | ||
|
||
@Override | ||
public FacetFilters read(final JsonReader jsonReader) throws IOException { | ||
return null; | ||
} | ||
} | ||
} | ||
|
||
@JsonAdapter(FacetFilters.Adapter.class) | ||
class FacetFiltersListListString extends FacetFilters { | ||
|
||
private final List<List<String>> insideValue; | ||
|
||
FacetFiltersListListString(List<List<String>> insideValue) { | ||
this.insideValue = insideValue; | ||
} | ||
|
||
@Override | ||
public List<List<String>> getInsideValue() { | ||
return insideValue; | ||
} | ||
} | ||
|
||
@JsonAdapter(FacetFilters.Adapter.class) | ||
class FacetFiltersListString extends FacetFilters { | ||
|
||
private final List<String> insideValue; | ||
|
||
FacetFiltersListString(List<String> insideValue) { | ||
this.insideValue = insideValue; | ||
} | ||
|
||
@Override | ||
public List<String> getInsideValue() { | ||
return insideValue; | ||
} | ||
} |
104 changes: 104 additions & 0 deletions
104
...-client-java-2/algoliasearch-core/src/com/algolia/model/recommend/MatchedGeoLocation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
package com.algolia.model.recommend; | ||
|
||
import com.google.gson.annotations.SerializedName; | ||
import java.util.Objects; | ||
|
||
/** MatchedGeoLocation */ | ||
public class MatchedGeoLocation { | ||
|
||
@SerializedName("lat") | ||
private Double lat; | ||
|
||
@SerializedName("lng") | ||
private Double lng; | ||
|
||
@SerializedName("distance") | ||
private Integer distance; | ||
|
||
public MatchedGeoLocation setLat(Double lat) { | ||
this.lat = lat; | ||
return this; | ||
} | ||
|
||
/** | ||
* Latitude of the matched location. | ||
* | ||
* @return lat | ||
*/ | ||
@javax.annotation.Nullable | ||
public Double getLat() { | ||
return lat; | ||
} | ||
|
||
public MatchedGeoLocation setLng(Double lng) { | ||
this.lng = lng; | ||
return this; | ||
} | ||
|
||
/** | ||
* Longitude of the matched location. | ||
* | ||
* @return lng | ||
*/ | ||
@javax.annotation.Nullable | ||
public Double getLng() { | ||
return lng; | ||
} | ||
|
||
public MatchedGeoLocation setDistance(Integer distance) { | ||
this.distance = distance; | ||
return this; | ||
} | ||
|
||
/** | ||
* Distance between the matched location and the search location (in meters). | ||
* | ||
* @return distance | ||
*/ | ||
@javax.annotation.Nullable | ||
public Integer getDistance() { | ||
return distance; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (o == null || getClass() != o.getClass()) { | ||
return false; | ||
} | ||
MatchedGeoLocation matchedGeoLocation = (MatchedGeoLocation) o; | ||
return ( | ||
Objects.equals(this.lat, matchedGeoLocation.lat) && | ||
Objects.equals(this.lng, matchedGeoLocation.lng) && | ||
Objects.equals(this.distance, matchedGeoLocation.distance) | ||
); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(lat, lng, distance); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder sb = new StringBuilder(); | ||
sb.append("class MatchedGeoLocation {\n"); | ||
sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); | ||
sb.append(" lng: ").append(toIndentedString(lng)).append("\n"); | ||
sb.append(" distance: ").append(toIndentedString(distance)).append("\n"); | ||
sb.append("}"); | ||
return sb.toString(); | ||
} | ||
|
||
/** | ||
* Convert the given object to string with each line indented by 4 spaces (except the first line). | ||
*/ | ||
private String toIndentedString(Object o) { | ||
if (o == null) { | ||
return "null"; | ||
} | ||
return o.toString().replace("\n", "\n "); | ||
} | ||
} |
Oops, something went wrong.