com.clinia.model.common.V1HumanName 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;
/** A human's name with the ability to identify parts and usage. */
public class V1HumanName {
@JsonProperty("id")
private String id;
@JsonProperty("use")
private String use;
@JsonProperty("text")
private String text;
@JsonProperty("given")
private List given;
@JsonProperty("prefix")
private List prefix;
@JsonProperty("suffix")
private List suffix;
@JsonProperty("family")
private String family;
@JsonProperty("period")
private V1Period period;
public V1HumanName setId(String id) {
this.id = id;
return this;
}
/** A sequence of Unicode characters. */
@javax.annotation.Nullable
public String getId() {
return id;
}
public V1HumanName setUse(String use) {
this.use = use;
return this;
}
/**
* A string which has at least one character and no leading or trailing whitespace and where there
* is no whitespace other than single spaces in the contents.
*/
@javax.annotation.Nullable
public String getUse() {
return use;
}
public V1HumanName setText(String text) {
this.text = text;
return this;
}
/** A sequence of Unicode characters. */
@javax.annotation.Nullable
public String getText() {
return text;
}
public V1HumanName setGiven(List given) {
this.given = given;
return this;
}
public V1HumanName addGiven(String givenItem) {
if (this.given == null) {
this.given = new ArrayList<>();
}
this.given.add(givenItem);
return this;
}
/** Given names (not always 'first'). Includes middle names. */
@javax.annotation.Nullable
public List getGiven() {
return given;
}
public V1HumanName setPrefix(List prefix) {
this.prefix = prefix;
return this;
}
public V1HumanName addPrefix(String prefixItem) {
if (this.prefix == null) {
this.prefix = new ArrayList<>();
}
this.prefix.add(prefixItem);
return this;
}
/** Parts that come before the name. */
@javax.annotation.Nullable
public List getPrefix() {
return prefix;
}
public V1HumanName setSuffix(List suffix) {
this.suffix = suffix;
return this;
}
public V1HumanName addSuffix(String suffixItem) {
if (this.suffix == null) {
this.suffix = new ArrayList<>();
}
this.suffix.add(suffixItem);
return this;
}
/** Parts that come after the name. */
@javax.annotation.Nullable
public List getSuffix() {
return suffix;
}
public V1HumanName setFamily(String family) {
this.family = family;
return this;
}
/** A sequence of Unicode characters. */
@javax.annotation.Nullable
public String getFamily() {
return family;
}
public V1HumanName setPeriod(V1Period period) {
this.period = period;
return this;
}
/** Get period */
@javax.annotation.Nullable
public V1Period getPeriod() {
return period;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
V1HumanName v1HumanName = (V1HumanName) o;
return (
Objects.equals(this.id, v1HumanName.id) &&
Objects.equals(this.use, v1HumanName.use) &&
Objects.equals(this.text, v1HumanName.text) &&
Objects.equals(this.given, v1HumanName.given) &&
Objects.equals(this.prefix, v1HumanName.prefix) &&
Objects.equals(this.suffix, v1HumanName.suffix) &&
Objects.equals(this.family, v1HumanName.family) &&
Objects.equals(this.period, v1HumanName.period)
);
}
@Override
public int hashCode() {
return Objects.hash(id, use, text, given, prefix, suffix, family, period);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class V1HumanName {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" use: ").append(toIndentedString(use)).append("\n");
sb.append(" text: ").append(toIndentedString(text)).append("\n");
sb.append(" given: ").append(toIndentedString(given)).append("\n");
sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n");
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
sb.append(" family: ").append(toIndentedString(family)).append("\n");
sb.append(" period: ").append(toIndentedString(period)).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 ");
}
}