no.nav.sbl.soknadsosialhjelp.soknad.familie.JsonSamvarsgrad Maven / Gradle / Ivy
package no.nav.sbl.soknadsosialhjelp.soknad.familie;
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.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import no.nav.sbl.soknadsosialhjelp.soknad.common.JsonKildeBruker;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"kilde",
"verdi"
})
public class JsonSamvarsgrad {
/**
* Alltid bruker eller utdatert.
*
*
* (Required)
*
*/
@JsonProperty("kilde")
private JsonKildeBruker kilde = JsonKildeBruker.fromValue("bruker");
/**
* Samværsgraden angitt i prosent.
* (Required)
*
*/
@JsonProperty("verdi")
@JsonPropertyDescription("Samv\u00e6rsgraden angitt i prosent.")
private Integer verdi;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* Alltid bruker eller utdatert.
*
*
* (Required)
*
*/
@JsonProperty("kilde")
public JsonKildeBruker getKilde() {
return kilde;
}
/**
* Alltid bruker eller utdatert.
*
*
* (Required)
*
*/
@JsonProperty("kilde")
public void setKilde(JsonKildeBruker kilde) {
this.kilde = kilde;
}
public JsonSamvarsgrad withKilde(JsonKildeBruker kilde) {
this.kilde = kilde;
return this;
}
/**
* Samværsgraden angitt i prosent.
* (Required)
*
*/
@JsonProperty("verdi")
public Integer getVerdi() {
return verdi;
}
/**
* Samværsgraden angitt i prosent.
* (Required)
*
*/
@JsonProperty("verdi")
public void setVerdi(Integer verdi) {
this.verdi = verdi;
}
public JsonSamvarsgrad withVerdi(Integer 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 JsonSamvarsgrad 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 JsonSamvarsgrad) == false) {
return false;
}
JsonSamvarsgrad rhs = ((JsonSamvarsgrad) other);
return new EqualsBuilder().append(kilde, rhs.kilde).append(additionalProperties, rhs.additionalProperties).append(verdi, rhs.verdi).isEquals();
}
}