com.clinia.model.common.V1ContactDetail 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;
/** General contact details. */
public class V1ContactDetail {
@JsonProperty("id")
private String id;
@JsonProperty("name")
private String name;
@JsonProperty("telecom")
private List telecom;
public V1ContactDetail setId(String id) {
this.id = id;
return this;
}
/** A sequence of Unicode characters. */
@javax.annotation.Nullable
public String getId() {
return id;
}
public V1ContactDetail setName(String name) {
this.name = name;
return this;
}
/** A sequence of Unicode characters. */
@javax.annotation.Nullable
public String getName() {
return name;
}
public V1ContactDetail setTelecom(List telecom) {
this.telecom = telecom;
return this;
}
public V1ContactDetail addTelecom(V1ContactPoint telecomItem) {
if (this.telecom == null) {
this.telecom = new ArrayList<>();
}
this.telecom.add(telecomItem);
return this;
}
/** Contact details for individual or organization. */
@javax.annotation.Nullable
public List getTelecom() {
return telecom;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1ContactDetail v1ContactDetail = (V1ContactDetail) o;
return (
Objects.equals(this.id, v1ContactDetail.id) &&
Objects.equals(this.name, v1ContactDetail.name) &&
Objects.equals(this.telecom, v1ContactDetail.telecom)
);
}
@Override
public int hashCode() {
return Objects.hash(id, name, telecom);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1ContactDetail {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" telecom: ").append(toIndentedString(telecom)).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 ");
}
}