org.finra.herd.sdk.model.IndexSearchRequest Maven / Gradle / Ivy
/*
* herd-external
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 0.125.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.finra.herd.sdk.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.finra.herd.sdk.model.IndexSearchFilter;
/**
* IndexSearchRequest
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-07-16T17:44:47.669-04:00[America/New_York]")
public class IndexSearchRequest {
@JsonProperty("searchTerm")
private String searchTerm = null;
@JsonProperty("indexSearchFilters")
private List indexSearchFilters = null;
@JsonProperty("facetFields")
private List facetFields = null;
@JsonProperty("enableHitHighlighting")
private Boolean enableHitHighlighting = null;
public IndexSearchRequest searchTerm(String searchTerm) {
this.searchTerm = searchTerm;
return this;
}
/**
* The search term upon which to search
* @return searchTerm
**/
@ApiModelProperty(value = "The search term upon which to search")
public String getSearchTerm() {
return searchTerm;
}
public void setSearchTerm(String searchTerm) {
this.searchTerm = searchTerm;
}
public IndexSearchRequest indexSearchFilters(List indexSearchFilters) {
this.indexSearchFilters = indexSearchFilters;
return this;
}
public IndexSearchRequest addIndexSearchFiltersItem(IndexSearchFilter indexSearchFiltersItem) {
if (this.indexSearchFilters == null) {
this.indexSearchFilters = new ArrayList();
}
this.indexSearchFilters.add(indexSearchFiltersItem);
return this;
}
/**
* A list of index search filters. Multiple filters are supported which are AND-ed
* @return indexSearchFilters
**/
@ApiModelProperty(value = "A list of index search filters. Multiple filters are supported which are AND-ed")
public List getIndexSearchFilters() {
return indexSearchFilters;
}
public void setIndexSearchFilters(List indexSearchFilters) {
this.indexSearchFilters = indexSearchFilters;
}
public IndexSearchRequest facetFields(List facetFields) {
this.facetFields = facetFields;
return this;
}
public IndexSearchRequest addFacetFieldsItem(String facetFieldsItem) {
if (this.facetFields == null) {
this.facetFields = new ArrayList();
}
this.facetFields.add(facetFieldsItem);
return this;
}
/**
* A list of Facet Fields to be included with the response. Only Tag and ResultType facet information is supported
* @return facetFields
**/
@ApiModelProperty(value = "A list of Facet Fields to be included with the response. Only Tag and ResultType facet information is supported ")
public List getFacetFields() {
return facetFields;
}
public void setFacetFields(List facetFields) {
this.facetFields = facetFields;
}
public IndexSearchRequest enableHitHighlighting(Boolean enableHitHighlighting) {
this.enableHitHighlighting = enableHitHighlighting;
return this;
}
/**
* An optional boolean flag that specifies if highlighting should be enabled on the matched terms or not
* @return enableHitHighlighting
**/
@ApiModelProperty(value = "An optional boolean flag that specifies if highlighting should be enabled on the matched terms or not ")
public Boolean getEnableHitHighlighting() {
return enableHitHighlighting;
}
public void setEnableHitHighlighting(Boolean enableHitHighlighting) {
this.enableHitHighlighting = enableHitHighlighting;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IndexSearchRequest indexSearchRequest = (IndexSearchRequest) o;
return Objects.equals(this.searchTerm, indexSearchRequest.searchTerm) &&
Objects.equals(this.indexSearchFilters, indexSearchRequest.indexSearchFilters) &&
Objects.equals(this.facetFields, indexSearchRequest.facetFields) &&
Objects.equals(this.enableHitHighlighting, indexSearchRequest.enableHitHighlighting);
}
@Override
public int hashCode() {
return Objects.hash(searchTerm, indexSearchFilters, facetFields, enableHitHighlighting);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IndexSearchRequest {\n");
sb.append(" searchTerm: ").append(toIndentedString(searchTerm)).append("\n");
sb.append(" indexSearchFilters: ").append(toIndentedString(indexSearchFilters)).append("\n");
sb.append(" facetFields: ").append(toIndentedString(facetFields)).append("\n");
sb.append(" enableHitHighlighting: ").append(toIndentedString(enableHitHighlighting)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}