com.groupbyinc.api.request.Request Maven / Gradle / Ivy
package com.groupbyinc.api.request;
import com.groupbyinc.api.model.CustomUrlParam;
import com.groupbyinc.common.security.AesContent;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import org.apache.commons.collections4.CollectionUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Request object for the api to send search service requests
*
* @internal
*/
public class Request {
private String clientKey;
private String collection;
private String area;
private String sessionId;
private String visitorId;
private String biasingProfile;
private String language;
@JsonProperty("pre-filter")
private String preFilterExpression;
private String query;
private String refinementQuery;
private String matchStrategyName;
private Biasing biasing;
private RestrictNavigation restrictNavigation;
private MatchStrategy matchStrategy;
private Integer skip;
private Integer pageSize;
private Boolean returnBinary;
private Boolean disableAutocorrection;
private AesContent securedPayload;
@JsonIgnore private Map queryUrlParams = new HashMap();
@JsonProperty
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List sort = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List fields = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List orFields = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List refinements = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List customUrlParams = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_DEFAULT) private Boolean wildcardSearchEnabled = false;
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List includedNavigations = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List excludedNavigations = new ArrayList();
@JsonInclude(JsonInclude.Include.NON_EMPTY) private List navigations = new ArrayList();
private Boolean pruneRefinements = true;
@JsonProperty("iNavEnabled")
private Boolean intelligentNavigationEnabled;
public String getClientKey() {
return clientKey;
}
public com.groupbyinc.api.request.Request setClientKey(String clientKey) {
this.clientKey = clientKey;
return this;
}
public String getArea() {
return area;
}
public com.groupbyinc.api.request.Request setArea(String area) {
this.area = area;
return this;
}
public String getCollection() {
return collection;
}
public com.groupbyinc.api.request.Request setCollection(String collection) {
this.collection = collection;
return this;
}
public String getSessionId() {
return sessionId;
}
public com.groupbyinc.api.request.Request setSessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
public String getVisitorId() {
return visitorId;
}
public com.groupbyinc.api.request.Request setVisitorId(String visitorId) {
this.visitorId = visitorId;
return this;
}
public String getQuery() {
return query;
}
public com.groupbyinc.api.request.Request setQuery(String query) {
this.query = query;
return this;
}
public Integer getSkip() {
return skip;
}
public com.groupbyinc.api.request.Request setSkip(Integer skip) {
this.skip = skip;
return this;
}
public Integer getPageSize() {
return pageSize;
}
public com.groupbyinc.api.request.Request setPageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
public List getCustomUrlParams() {
return customUrlParams;
}
public com.groupbyinc.api.request.Request setCustomUrlParams(List customUrlParams) {
this.customUrlParams = customUrlParams;
return this;
}
public List getFields() {
return fields;
}
public com.groupbyinc.api.request.Request setFields(List fields) {
this.fields = fields;
return this;
}
public List getOrFields() {
return orFields;
}
public com.groupbyinc.api.request.Request setOrFields(List orFields) {
this.orFields = orFields;
return this;
}
public String getBiasingProfile() {
return biasingProfile;
}
public com.groupbyinc.api.request.Request setBiasingProfile(String biasingProfile) {
this.biasingProfile = biasingProfile;
return this;
}
public List getSort() {
return sort;
}
@JsonIgnore
public com.groupbyinc.api.request.Request setSort(Sort... sort) {
CollectionUtils.addAll(this.sort, sort);
return this;
}
@JsonSetter
public com.groupbyinc.api.request.Request setSort(List sort) {
this.sort = sort;
return this;
}
public String getLanguage() {
return language;
}
public com.groupbyinc.api.request.Request setLanguage(String language) {
this.language = language;
return this;
}
public String getPreFilterExpression() {
return preFilterExpression;
}
public com.groupbyinc.api.request.Request setPreFilterExpression(String preFilterExpression) {
this.preFilterExpression = preFilterExpression;
return this;
}
public Boolean getPruneRefinements() {
return pruneRefinements;
}
public com.groupbyinc.api.request.Request setPruneRefinements(Boolean pruneRefinements) {
this.pruneRefinements = pruneRefinements;
return this;
}
public Boolean getReturnBinary() {
return returnBinary;
}
public com.groupbyinc.api.request.Request setReturnBinary(Boolean returnBinary) {
this.returnBinary = returnBinary;
return this;
}
public Boolean getDisableAutocorrection() {
return disableAutocorrection;
}
public com.groupbyinc.api.request.Request setDisableAutocorrection(Boolean disableAutocorrection) {
this.disableAutocorrection = disableAutocorrection;
return this;
}
public List getRefinements() {
return refinements;
}
public com.groupbyinc.api.request.Request setRefinements(List refinements) {
this.refinements = refinements;
return this;
}
public String getRefinementQuery() {
return refinementQuery;
}
public com.groupbyinc.api.request.Request setRefinementQuery(String refinementQuery) {
this.refinementQuery = refinementQuery;
return this;
}
public RestrictNavigation getRestrictNavigation() {
return restrictNavigation;
}
public com.groupbyinc.api.request.Request setRestrictNavigation(RestrictNavigation restrictNavigation) {
this.restrictNavigation = restrictNavigation;
return this;
}
public Boolean isWildcardSearchEnabled() {
return wildcardSearchEnabled;
}
public com.groupbyinc.api.request.Request setWildcardSearchEnabled(Boolean wildcardSearchEnabled) {
this.wildcardSearchEnabled = wildcardSearchEnabled;
return this;
}
public MatchStrategy getMatchStrategy() {
return matchStrategy;
}
public com.groupbyinc.api.request.Request setMatchStrategy(MatchStrategy matchStrategy) {
this.matchStrategy = matchStrategy;
return this;
}
public List getIncludedNavigations() {
return includedNavigations;
}
public com.groupbyinc.api.request.Request setIncludedNavigations(List includedNavigations) {
this.includedNavigations = includedNavigations;
return this;
}
public List getExcludedNavigations() {
return excludedNavigations;
}
public com.groupbyinc.api.request.Request setExcludedNavigations(List excludedNavigations) {
this.excludedNavigations = excludedNavigations;
return this;
}
public Biasing getBiasing() {
return biasing;
}
public com.groupbyinc.api.request.Request setBiasing(Biasing biasing) {
this.biasing = biasing;
return this;
}
public String getMatchStrategyName() {
return matchStrategyName;
}
public com.groupbyinc.api.request.Request setMatchStrategyName(String matchStrategyName) {
this.matchStrategyName = matchStrategyName;
return this;
}
public Map getQueryUrlParams() {
return queryUrlParams;
}
public com.groupbyinc.api.request.Request setQueryUrlParams(Map queryUrlParams) {
this.queryUrlParams = queryUrlParams;
return this;
}
public AesContent getSecuredPayload() {
return securedPayload;
}
public com.groupbyinc.api.request.Request setSecuredPayload(AesContent securedPayload) {
this.securedPayload = securedPayload;
return this;
}
public List getNavigations() {
return navigations;
}
public com.groupbyinc.api.request.Request setNavigations(List navigations) {
this.navigations = navigations;
return this;
}
public Boolean getIntelligentNavigationEnabled() {
return intelligentNavigationEnabled;
}
public com.groupbyinc.api.request.Request setIntelligentNavigationEnabled(Boolean intelligentNavigationEnabled) {
this.intelligentNavigationEnabled = intelligentNavigationEnabled;
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy