no.nav.sbl.soknadsosialhjelp.soknad.adresse.JsonUstrukturertAdresse Maven / Gradle / Ivy
package no.nav.sbl.soknadsosialhjelp.soknad.adresse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import no.nav.sbl.soknadsosialhjelp.soknad.common.JsonKilde;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
/**
* Angir ustrukturert adresse (liste med tekststrenger).
*
*
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"adresse"
})
public class JsonUstrukturertAdresse
extends JsonAdresse
{
@JsonProperty("adresse")
private List adresse = new ArrayList();
@JsonIgnore
private Map additionalProperties = new HashMap();
@JsonProperty("adresse")
public List getAdresse() {
return adresse;
}
@JsonProperty("adresse")
public void setAdresse(List adresse) {
this.adresse = adresse;
}
public JsonUstrukturertAdresse withAdresse(List adresse) {
this.adresse = adresse;
return this;
}
@Override
public JsonUstrukturertAdresse withKilde(JsonKilde kilde) {
super.withKilde(kilde);
return this;
}
@Override
public JsonUstrukturertAdresse withType(JsonAdresse.Type type) {
super.withType(type);
return this;
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
public JsonUstrukturertAdresse withAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
return this;
}
@Override
public String toString() {
return new ToStringBuilder(this).appendSuper(super.toString()).append("adresse", adresse).append("additionalProperties", additionalProperties).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().appendSuper(super.hashCode()).append(adresse).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof JsonUstrukturertAdresse) == false) {
return false;
}
JsonUstrukturertAdresse rhs = ((JsonUstrukturertAdresse) other);
return new EqualsBuilder().appendSuper(super.equals(other)).append(adresse, rhs.adresse).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}