All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.nav.sbl.soknadsosialhjelp.soknad.personalia.JsonPersonIdentifikator Maven / Gradle / Ivy

There is a newer version: 1.2019.09.25-00.21-49b69f0625e0
Show newest version

package no.nav.sbl.soknadsosialhjelp.soknad.personalia;

import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
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 com.fasterxml.jackson.annotation.JsonValue;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;


/**
 * Unik identifikasjon av søker
 * 

* * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "kilde", "verdi" }) public class JsonPersonIdentifikator { /** * Alltid system (og aldri utdatert). *

* * (Required) * */ @JsonProperty("kilde") private JsonPersonIdentifikator.Kilde kilde = JsonPersonIdentifikator.Kilde.fromValue("system"); /** * Et fødselsnummer eller et D-nummer. *

* * (Required) * */ @JsonProperty("verdi") private String verdi; @JsonIgnore private Map additionalProperties = new HashMap(); /** * Alltid system (og aldri utdatert). *

* * (Required) * */ @JsonProperty("kilde") public JsonPersonIdentifikator.Kilde getKilde() { return kilde; } /** * Alltid system (og aldri utdatert). *

* * (Required) * */ @JsonProperty("kilde") public void setKilde(JsonPersonIdentifikator.Kilde kilde) { this.kilde = kilde; } public JsonPersonIdentifikator withKilde(JsonPersonIdentifikator.Kilde kilde) { this.kilde = kilde; return this; } /** * Et fødselsnummer eller et D-nummer. *

* * (Required) * */ @JsonProperty("verdi") public String getVerdi() { return verdi; } /** * Et fødselsnummer eller et D-nummer. *

* * (Required) * */ @JsonProperty("verdi") public void setVerdi(String verdi) { this.verdi = verdi; } public JsonPersonIdentifikator withVerdi(String verdi) { this.verdi = verdi; return this; } @JsonAnyGetter public Map getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } public JsonPersonIdentifikator withAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); return this; } @Override public String toString() { return new ToStringBuilder(this).append("kilde", kilde).append("verdi", verdi).append("additionalProperties", additionalProperties).toString(); } @Override public int hashCode() { return new HashCodeBuilder().append(kilde).append(additionalProperties).append(verdi).toHashCode(); } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof JsonPersonIdentifikator) == false) { return false; } JsonPersonIdentifikator rhs = ((JsonPersonIdentifikator) other); return new EqualsBuilder().append(kilde, rhs.kilde).append(additionalProperties, rhs.additionalProperties).append(verdi, rhs.verdi).isEquals(); } public enum Kilde { SYSTEM("system"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (JsonPersonIdentifikator.Kilde c: values()) { CONSTANTS.put(c.value, c); } } private Kilde(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static JsonPersonIdentifikator.Kilde fromValue(String value) { JsonPersonIdentifikator.Kilde constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy