com.clinia.model.common.V1OrOperator 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;
/** V1OrOperator */
@JsonDeserialize(as = V1OrOperator.class)
public class V1OrOperator implements V1Operator {
@JsonProperty("id")
private String id;
@JsonProperty("or")
private List or = new ArrayList<>();
public V1OrOperator setId(String id) {
this.id = id;
return this;
}
/** Get id */
@javax.annotation.Nullable
public String getId() {
return id;
}
public V1OrOperator setOr(List or) {
this.or = or;
return this;
}
public V1OrOperator addOr(V1Operator orItem) {
this.or.add(orItem);
return this;
}
/** Get or */
@javax.annotation.Nonnull
public List getOr() {
return or;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1OrOperator v1OrOperator = (V1OrOperator) o;
return Objects.equals(this.id, v1OrOperator.id) && Objects.equals(this.or, v1OrOperator.or);
}
@Override
public int hashCode() {
return Objects.hash(id, or);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1OrOperator {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" or: ").append(toIndentedString(or)).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 ");
}
}