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

uk.gov.justice.laa.crime.common.model.hardship.HardshipReview Maven / Gradle / Ivy


package uk.gov.justice.laa.crime.common.model.hardship;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
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.Valid;
import jakarta.validation.constraints.NotNull;
import uk.gov.justice.laa.crime.enums.CourtType;


/**
 * Hardship Review
 * 

* Hardship Review Data * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "courtType", "totalAnnualDisposableIncome", "reviewDate", "extraExpenditure", "deniedIncome", "solicitorCosts" }) @Generated("jsonschema2pojo") public class HardshipReview { /** * The Court Type * (Required) * */ @JsonProperty("courtType") @JsonPropertyDescription("The Court Type") @Valid @NotNull private CourtType courtType; /** * The applicants total annual disposable income * (Required) * */ @JsonProperty("totalAnnualDisposableIncome") @JsonPropertyDescription("The applicants total annual disposable income") @NotNull private BigDecimal totalAnnualDisposableIncome; /** * The hardship review date * (Required) * */ @JsonProperty("reviewDate") @JsonPropertyDescription("The hardship review date") @NotNull private LocalDateTime reviewDate; /** * Extra expenditure * */ @JsonProperty("extraExpenditure") @JsonPropertyDescription("Extra expenditure") @Valid private List extraExpenditure = new ArrayList(); /** * Denied income * */ @JsonProperty("deniedIncome") @JsonPropertyDescription("Denied income") @Valid private List deniedIncome = new ArrayList(); /** * The Solicitor Costs schema *

* Details of solicitor cost * */ @JsonProperty("solicitorCosts") @JsonPropertyDescription("Details of solicitor cost") @Valid private SolicitorCosts solicitorCosts; protected final static Object NOT_FOUND_VALUE = new Object(); /** * No args constructor for use in serialization * */ public HardshipReview() { } /** * * @param courtType * @param reviewDate * @param deniedIncome * @param extraExpenditure * @param totalAnnualDisposableIncome * @param solicitorCosts */ public HardshipReview(CourtType courtType, BigDecimal totalAnnualDisposableIncome, LocalDateTime reviewDate, List extraExpenditure, List deniedIncome, SolicitorCosts solicitorCosts) { super(); this.courtType = courtType; this.totalAnnualDisposableIncome = totalAnnualDisposableIncome; this.reviewDate = reviewDate; this.extraExpenditure = extraExpenditure; this.deniedIncome = deniedIncome; this.solicitorCosts = solicitorCosts; } /** * The Court Type * (Required) * */ @JsonProperty("courtType") public CourtType getCourtType() { return courtType; } /** * The Court Type * (Required) * */ @JsonProperty("courtType") public void setCourtType(CourtType courtType) { this.courtType = courtType; } public HardshipReview withCourtType(CourtType courtType) { this.courtType = courtType; return this; } /** * The applicants total annual disposable income * (Required) * */ @JsonProperty("totalAnnualDisposableIncome") public BigDecimal getTotalAnnualDisposableIncome() { return totalAnnualDisposableIncome; } /** * The applicants total annual disposable income * (Required) * */ @JsonProperty("totalAnnualDisposableIncome") public void setTotalAnnualDisposableIncome(BigDecimal totalAnnualDisposableIncome) { this.totalAnnualDisposableIncome = totalAnnualDisposableIncome; } public HardshipReview withTotalAnnualDisposableIncome(BigDecimal totalAnnualDisposableIncome) { this.totalAnnualDisposableIncome = totalAnnualDisposableIncome; return this; } /** * The hardship review date * (Required) * */ @JsonProperty("reviewDate") public LocalDateTime getReviewDate() { return reviewDate; } /** * The hardship review date * (Required) * */ @JsonProperty("reviewDate") public void setReviewDate(LocalDateTime reviewDate) { this.reviewDate = reviewDate; } public HardshipReview withReviewDate(LocalDateTime reviewDate) { this.reviewDate = reviewDate; return this; } /** * Extra expenditure * */ @JsonProperty("extraExpenditure") public List getExtraExpenditure() { return extraExpenditure; } /** * Extra expenditure * */ @JsonProperty("extraExpenditure") public void setExtraExpenditure(List extraExpenditure) { this.extraExpenditure = extraExpenditure; } public HardshipReview withExtraExpenditure(List extraExpenditure) { this.extraExpenditure = extraExpenditure; return this; } /** * Denied income * */ @JsonProperty("deniedIncome") public List getDeniedIncome() { return deniedIncome; } /** * Denied income * */ @JsonProperty("deniedIncome") public void setDeniedIncome(List deniedIncome) { this.deniedIncome = deniedIncome; } public HardshipReview withDeniedIncome(List deniedIncome) { this.deniedIncome = deniedIncome; return this; } /** * The Solicitor Costs schema *

* Details of solicitor cost * */ @JsonProperty("solicitorCosts") public SolicitorCosts getSolicitorCosts() { return solicitorCosts; } /** * The Solicitor Costs schema *

* Details of solicitor cost * */ @JsonProperty("solicitorCosts") public void setSolicitorCosts(SolicitorCosts solicitorCosts) { this.solicitorCosts = solicitorCosts; } public HardshipReview withSolicitorCosts(SolicitorCosts solicitorCosts) { this.solicitorCosts = solicitorCosts; return this; } protected boolean declaredProperty(String name, Object value) { if ("courtType".equals(name)) { if (value instanceof CourtType) { setCourtType(((CourtType) value)); } else { throw new IllegalArgumentException(("property \"courtType\" is of type \"uk.gov.justice.laa.crime.enums.CourtType\", but got "+ value.getClass().toString())); } return true; } else { if ("totalAnnualDisposableIncome".equals(name)) { if (value instanceof BigDecimal) { setTotalAnnualDisposableIncome(((BigDecimal) value)); } else { throw new IllegalArgumentException(("property \"totalAnnualDisposableIncome\" is of type \"java.math.BigDecimal\", but got "+ value.getClass().toString())); } return true; } else { if ("reviewDate".equals(name)) { if (value instanceof LocalDateTime) { setReviewDate(((LocalDateTime) value)); } else { throw new IllegalArgumentException(("property \"reviewDate\" is of type \"java.time.LocalDateTime\", but got "+ value.getClass().toString())); } return true; } else { if ("extraExpenditure".equals(name)) { if (value instanceof List) { setExtraExpenditure(((List ) value)); } else { throw new IllegalArgumentException(("property \"extraExpenditure\" is of type \"java.util.List\", but got "+ value.getClass().toString())); } return true; } else { if ("deniedIncome".equals(name)) { if (value instanceof List) { setDeniedIncome(((List ) value)); } else { throw new IllegalArgumentException(("property \"deniedIncome\" is of type \"java.util.List\", but got "+ value.getClass().toString())); } return true; } else { if ("solicitorCosts".equals(name)) { if (value instanceof SolicitorCosts) { setSolicitorCosts(((SolicitorCosts) value)); } else { throw new IllegalArgumentException(("property \"solicitorCosts\" is of type \"uk.gov.justice.laa.crime.common.model.hardship.SolicitorCosts\", but got "+ value.getClass().toString())); } return true; } else { return false; } } } } } } } protected Object declaredPropertyOrNotFound(String name, Object notFoundValue) { if ("courtType".equals(name)) { return getCourtType(); } else { if ("totalAnnualDisposableIncome".equals(name)) { return getTotalAnnualDisposableIncome(); } else { if ("reviewDate".equals(name)) { return getReviewDate(); } else { if ("extraExpenditure".equals(name)) { return getExtraExpenditure(); } else { if ("deniedIncome".equals(name)) { return getDeniedIncome(); } else { if ("solicitorCosts".equals(name)) { return getSolicitorCosts(); } else { return notFoundValue; } } } } } } } @SuppressWarnings({ "unchecked" }) publicT get(String name) { Object value = declaredPropertyOrNotFound(name, HardshipReview.NOT_FOUND_VALUE); if (HardshipReview.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 HardshipReview 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(HardshipReview.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("courtType"); sb.append('='); sb.append(((this.courtType == null)?"":this.courtType)); sb.append(','); sb.append("totalAnnualDisposableIncome"); sb.append('='); sb.append(((this.totalAnnualDisposableIncome == null)?"":this.totalAnnualDisposableIncome)); sb.append(','); sb.append("reviewDate"); sb.append('='); sb.append(((this.reviewDate == null)?"":this.reviewDate)); sb.append(','); sb.append("extraExpenditure"); sb.append('='); sb.append(((this.extraExpenditure == null)?"":this.extraExpenditure)); sb.append(','); sb.append("deniedIncome"); sb.append('='); sb.append(((this.deniedIncome == null)?"":this.deniedIncome)); sb.append(','); sb.append("solicitorCosts"); sb.append('='); sb.append(((this.solicitorCosts == null)?"":this.solicitorCosts)); 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.courtType == null)? 0 :this.courtType.hashCode())); result = ((result* 31)+((this.reviewDate == null)? 0 :this.reviewDate.hashCode())); result = ((result* 31)+((this.deniedIncome == null)? 0 :this.deniedIncome.hashCode())); result = ((result* 31)+((this.extraExpenditure == null)? 0 :this.extraExpenditure.hashCode())); result = ((result* 31)+((this.totalAnnualDisposableIncome == null)? 0 :this.totalAnnualDisposableIncome.hashCode())); result = ((result* 31)+((this.solicitorCosts == null)? 0 :this.solicitorCosts.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof HardshipReview) == false) { return false; } HardshipReview rhs = ((HardshipReview) other); return (((((((this.courtType == rhs.courtType)||((this.courtType!= null)&&this.courtType.equals(rhs.courtType)))&&((this.reviewDate == rhs.reviewDate)||((this.reviewDate!= null)&&this.reviewDate.equals(rhs.reviewDate))))&&((this.deniedIncome == rhs.deniedIncome)||((this.deniedIncome!= null)&&this.deniedIncome.equals(rhs.deniedIncome))))&&((this.extraExpenditure == rhs.extraExpenditure)||((this.extraExpenditure!= null)&&this.extraExpenditure.equals(rhs.extraExpenditure))))&&((this.totalAnnualDisposableIncome == rhs.totalAnnualDisposableIncome)||((this.totalAnnualDisposableIncome!= null)&&this.totalAnnualDisposableIncome.equals(rhs.totalAnnualDisposableIncome))))&&((this.solicitorCosts == rhs.solicitorCosts)||((this.solicitorCosts!= null)&&this.solicitorCosts.equals(rhs.solicitorCosts)))); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy