com.algolia.model.search.FacetOrdering Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of algoliasearch Show documentation
Show all versions of algoliasearch Show documentation
Java client for Algolia Search API
The newest version!
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
package com.algolia.model.search;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/** Order of facet names and facet values in your UI. */
public class FacetOrdering {
@JsonProperty("facets")
private Facets facets;
@JsonProperty("values")
private Map values;
public FacetOrdering setFacets(Facets facets) {
this.facets = facets;
return this;
}
/** Get facets */
@javax.annotation.Nullable
public Facets getFacets() {
return facets;
}
public FacetOrdering setValues(Map values) {
this.values = values;
return this;
}
public FacetOrdering putValues(String key, Value valuesItem) {
if (this.values == null) {
this.values = new HashMap<>();
}
this.values.put(key, valuesItem);
return this;
}
/** Order of facet values. One object for each facet. */
@javax.annotation.Nullable
public Map getValues() {
return values;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FacetOrdering facetOrdering = (FacetOrdering) o;
return Objects.equals(this.facets, facetOrdering.facets) && Objects.equals(this.values, facetOrdering.values);
}
@Override
public int hashCode() {
return Objects.hash(facets, values);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FacetOrdering {\n");
sb.append(" facets: ").append(toIndentedString(facets)).append("\n");
sb.append(" values: ").append(toIndentedString(values)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy