com.clinia.model.common.V1QueryResponse Maven / Gradle / Ivy
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.
package com.clinia.model.common;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** V1QueryResponse */
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.EXISTING_PROPERTY,
property = "type",
visible = true,
defaultImpl = V1QueryResponse.class
)
public class V1QueryResponse {
@JsonProperty("hits")
private List> hits = new ArrayList<>();
@JsonProperty("meta")
private V1QueryResponseMeta meta;
public V1QueryResponse setHits(List> hits) {
this.hits = hits;
return this;
}
public V1QueryResponse addHits(V1Hit hitsItem) {
this.hits.add(hitsItem);
return this;
}
/** Get hits */
@javax.annotation.Nonnull
public List> getHits() {
return hits;
}
public V1QueryResponse setMeta(V1QueryResponseMeta meta) {
this.meta = meta;
return this;
}
/** Get meta */
@javax.annotation.Nonnull
public V1QueryResponseMeta getMeta() {
return meta;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1QueryResponse> v1QueryResponse = (V1QueryResponse>) o;
return Objects.equals(this.hits, v1QueryResponse.hits) && Objects.equals(this.meta, v1QueryResponse.meta);
}
@Override
public int hashCode() {
return Objects.hash(hits, meta);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1QueryResponse {\n");
sb.append(" hits: ").append(toIndentedString(hits)).append("\n");
sb.append(" meta: ").append(toIndentedString(meta)).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 ");
}
}