
uk.gov.justice.laa.crime.common.model.meansassessment.ApiAssessmentSummary Maven / Gradle / Ivy
package uk.gov.justice.laa.crime.common.model.meansassessment;
import java.time.LocalDateTime;
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;
import jakarta.validation.constraints.NotNull;
import uk.gov.justice.laa.crime.enums.WorkType;
/**
* Assessment Summary
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"assessmentDate",
"type",
"reviewType",
"status",
"result"
})
@Generated("jsonschema2pojo")
public class ApiAssessmentSummary {
/**
* Assessment ID
* (Required)
*
*/
@JsonProperty("id")
@JsonPropertyDescription("Assessment ID")
@NotNull
private Integer id;
/**
* Assessment date
* (Required)
*
*/
@JsonProperty("assessmentDate")
@JsonPropertyDescription("Assessment date")
@NotNull
private LocalDateTime assessmentDate;
/**
* Assessment type (work_type)
* (Required)
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Assessment type (work_type)")
@NotNull
private WorkType type;
/**
* Review type code
*
*/
@JsonProperty("reviewType")
@JsonPropertyDescription("Review type code")
private String reviewType;
/**
* Assessment status
* (Required)
*
*/
@JsonProperty("status")
@JsonPropertyDescription("Assessment status")
@NotNull
private String status;
/**
* Outcome of an Assessment
* (Required)
*
*/
@JsonProperty("result")
@JsonPropertyDescription("Outcome of an Assessment")
@NotNull
private String result;
protected final static Object NOT_FOUND_VALUE = new Object();
/**
* No args constructor for use in serialization
*
*/
public ApiAssessmentSummary() {
}
/**
*
* @param result
* @param assessmentDate
* @param reviewType
* @param id
* @param type
* @param status
*/
public ApiAssessmentSummary(Integer id, LocalDateTime assessmentDate, WorkType type, String reviewType, String status, String result) {
super();
this.id = id;
this.assessmentDate = assessmentDate;
this.type = type;
this.reviewType = reviewType;
this.status = status;
this.result = result;
}
/**
* Assessment ID
* (Required)
*
*/
@JsonProperty("id")
public Integer getId() {
return id;
}
/**
* Assessment ID
* (Required)
*
*/
@JsonProperty("id")
public void setId(Integer id) {
this.id = id;
}
public ApiAssessmentSummary withId(Integer id) {
this.id = id;
return this;
}
/**
* Assessment date
* (Required)
*
*/
@JsonProperty("assessmentDate")
public LocalDateTime getAssessmentDate() {
return assessmentDate;
}
/**
* Assessment date
* (Required)
*
*/
@JsonProperty("assessmentDate")
public void setAssessmentDate(LocalDateTime assessmentDate) {
this.assessmentDate = assessmentDate;
}
public ApiAssessmentSummary withAssessmentDate(LocalDateTime assessmentDate) {
this.assessmentDate = assessmentDate;
return this;
}
/**
* Assessment type (work_type)
* (Required)
*
*/
@JsonProperty("type")
public WorkType getType() {
return type;
}
/**
* Assessment type (work_type)
* (Required)
*
*/
@JsonProperty("type")
public void setType(WorkType type) {
this.type = type;
}
public ApiAssessmentSummary withType(WorkType type) {
this.type = type;
return this;
}
/**
* Review type code
*
*/
@JsonProperty("reviewType")
public String getReviewType() {
return reviewType;
}
/**
* Review type code
*
*/
@JsonProperty("reviewType")
public void setReviewType(String reviewType) {
this.reviewType = reviewType;
}
public ApiAssessmentSummary withReviewType(String reviewType) {
this.reviewType = reviewType;
return this;
}
/**
* Assessment status
* (Required)
*
*/
@JsonProperty("status")
public String getStatus() {
return status;
}
/**
* Assessment status
* (Required)
*
*/
@JsonProperty("status")
public void setStatus(String status) {
this.status = status;
}
public ApiAssessmentSummary withStatus(String status) {
this.status = status;
return this;
}
/**
* Outcome of an Assessment
* (Required)
*
*/
@JsonProperty("result")
public String getResult() {
return result;
}
/**
* Outcome of an Assessment
* (Required)
*
*/
@JsonProperty("result")
public void setResult(String result) {
this.result = result;
}
public ApiAssessmentSummary withResult(String result) {
this.result = result;
return this;
}
protected boolean declaredProperty(String name, Object value) {
if ("id".equals(name)) {
if (value instanceof Integer) {
setId(((Integer) value));
} else {
throw new IllegalArgumentException(("property \"id\" is of type \"java.lang.Integer\", but got "+ value.getClass().toString()));
}
return true;
} else {
if ("assessmentDate".equals(name)) {
if (value instanceof LocalDateTime) {
setAssessmentDate(((LocalDateTime) value));
} else {
throw new IllegalArgumentException(("property \"assessmentDate\" is of type \"java.time.LocalDateTime\", but got "+ value.getClass().toString()));
}
return true;
} else {
if ("type".equals(name)) {
if (value instanceof WorkType) {
setType(((WorkType) value));
} else {
throw new IllegalArgumentException(("property \"type\" is of type \"uk.gov.justice.laa.crime.enums.WorkType\", but got "+ value.getClass().toString()));
}
return true;
} else {
if ("reviewType".equals(name)) {
if (value instanceof String) {
setReviewType(((String) value));
} else {
throw new IllegalArgumentException(("property \"reviewType\" is of type \"java.lang.String\", but got "+ value.getClass().toString()));
}
return true;
} else {
if ("status".equals(name)) {
if (value instanceof String) {
setStatus(((String) value));
} else {
throw new IllegalArgumentException(("property \"status\" is of type \"java.lang.String\", but got "+ value.getClass().toString()));
}
return true;
} else {
if ("result".equals(name)) {
if (value instanceof String) {
setResult(((String) value));
} else {
throw new IllegalArgumentException(("property \"result\" is of type \"java.lang.String\", but got "+ value.getClass().toString()));
}
return true;
} else {
return false;
}
}
}
}
}
}
}
protected Object declaredPropertyOrNotFound(String name, Object notFoundValue) {
if ("id".equals(name)) {
return getId();
} else {
if ("assessmentDate".equals(name)) {
return getAssessmentDate();
} else {
if ("type".equals(name)) {
return getType();
} else {
if ("reviewType".equals(name)) {
return getReviewType();
} else {
if ("status".equals(name)) {
return getStatus();
} else {
if ("result".equals(name)) {
return getResult();
} else {
return notFoundValue;
}
}
}
}
}
}
}
@SuppressWarnings({
"unchecked"
})
publicT get(String name) {
Object value = declaredPropertyOrNotFound(name, ApiAssessmentSummary.NOT_FOUND_VALUE);
if (ApiAssessmentSummary.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 ApiAssessmentSummary 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(ApiAssessmentSummary.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("id");
sb.append('=');
sb.append(((this.id == null)?"":this.id));
sb.append(',');
sb.append("assessmentDate");
sb.append('=');
sb.append(((this.assessmentDate == null)?"":this.assessmentDate));
sb.append(',');
sb.append("type");
sb.append('=');
sb.append(((this.type == null)?"":this.type));
sb.append(',');
sb.append("reviewType");
sb.append('=');
sb.append(((this.reviewType == null)?"":this.reviewType));
sb.append(',');
sb.append("status");
sb.append('=');
sb.append(((this.status == null)?"":this.status));
sb.append(',');
sb.append("result");
sb.append('=');
sb.append(((this.result == null)?"":this.result));
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.result == null)? 0 :this.result.hashCode()));
result = ((result* 31)+((this.assessmentDate == null)? 0 :this.assessmentDate.hashCode()));
result = ((result* 31)+((this.reviewType == null)? 0 :this.reviewType.hashCode()));
result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.status == null)? 0 :this.status.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ApiAssessmentSummary) == false) {
return false;
}
ApiAssessmentSummary rhs = ((ApiAssessmentSummary) other);
return (((((((this.result == rhs.result)||((this.result!= null)&&this.result.equals(rhs.result)))&&((this.assessmentDate == rhs.assessmentDate)||((this.assessmentDate!= null)&&this.assessmentDate.equals(rhs.assessmentDate))))&&((this.reviewType == rhs.reviewType)||((this.reviewType!= null)&&this.reviewType.equals(rhs.reviewType))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.status == rhs.status)||((this.status!= null)&&this.status.equals(rhs.status))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy