
uk.gov.justice.laa.crime.common.model.evidence.ApiEvidenceFee Maven / Gradle / Ivy
package uk.gov.justice.laa.crime.common.model.evidence;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Evidence Fee
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"feeLevel",
"description"
})
@Generated("jsonschema2pojo")
public class ApiEvidenceFee {
/**
* Evidence Fee Level
*
*/
@JsonProperty("feeLevel")
@JsonPropertyDescription("Evidence Fee Level")
private String feeLevel;
/**
* Evidence description
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Evidence description")
private String description;
protected final static Object NOT_FOUND_VALUE = new Object();
/**
* No args constructor for use in serialization
*
*/
public ApiEvidenceFee() {
}
/**
*
* @param description
* @param feeLevel
*/
public ApiEvidenceFee(String feeLevel, String description) {
super();
this.feeLevel = feeLevel;
this.description = description;
}
/**
* Evidence Fee Level
*
*/
@JsonProperty("feeLevel")
public String getFeeLevel() {
return feeLevel;
}
/**
* Evidence Fee Level
*
*/
@JsonProperty("feeLevel")
public void setFeeLevel(String feeLevel) {
this.feeLevel = feeLevel;
}
public ApiEvidenceFee withFeeLevel(String feeLevel) {
this.feeLevel = feeLevel;
return this;
}
/**
* Evidence description
*
*/
@JsonProperty("description")
public String getDescription() {
return description;
}
/**
* Evidence description
*
*/
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
public ApiEvidenceFee withDescription(String description) {
this.description = description;
return this;
}
protected boolean declaredProperty(String name, Object value) {
if ("feeLevel".equals(name)) {
if (value instanceof String) {
setFeeLevel(((String) value));
} else {
throw new IllegalArgumentException(("property \"feeLevel\" is of type \"java.lang.String\", but got "+ value.getClass().toString()));
}
return true;
} else {
if ("description".equals(name)) {
if (value instanceof String) {
setDescription(((String) value));
} else {
throw new IllegalArgumentException(("property \"description\" is of type \"java.lang.String\", but got "+ value.getClass().toString()));
}
return true;
} else {
return false;
}
}
}
protected Object declaredPropertyOrNotFound(String name, Object notFoundValue) {
if ("feeLevel".equals(name)) {
return getFeeLevel();
} else {
if ("description".equals(name)) {
return getDescription();
} else {
return notFoundValue;
}
}
}
@SuppressWarnings({
"unchecked"
})
publicT get(String name) {
Object value = declaredPropertyOrNotFound(name, ApiEvidenceFee.NOT_FOUND_VALUE);
if (ApiEvidenceFee.NOT_FOUND_VALUE!= value) {
return ((T) value);
} else {
throw new IllegalArgumentException((("property \""+ name)+"\" is not defined"));
}
}
public void set(String name, Object value) {
if (!declaredProperty(name, value)) {
throw new IllegalArgumentException((("property \""+ name)+"\" is not defined"));
}
}
public ApiEvidenceFee with(String name, Object value) {
if (!declaredProperty(name, value)) {
throw new IllegalArgumentException((("property \""+ name)+"\" is not defined"));
}
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(ApiEvidenceFee.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("feeLevel");
sb.append('=');
sb.append(((this.feeLevel == null)?"":this.feeLevel));
sb.append(',');
sb.append("description");
sb.append('=');
sb.append(((this.description == null)?"":this.description));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
result = ((result* 31)+((this.feeLevel == null)? 0 :this.feeLevel.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ApiEvidenceFee) == false) {
return false;
}
ApiEvidenceFee rhs = ((ApiEvidenceFee) other);
return (((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description)))&&((this.feeLevel == rhs.feeLevel)||((this.feeLevel!= null)&&this.feeLevel.equals(rhs.feeLevel))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy