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

uk.gov.justice.laa.crime.common.model.evidence.ApiApplicantDetails 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;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import uk.gov.justice.laa.crime.enums.EmploymentStatus;


/**
 * Applicant Details
 * 

* Information about an applicants reference and employment * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "id", "employmentStatus" }) @Generated("jsonschema2pojo") public class ApiApplicantDetails { /** * The Applicants Reference * (Required) * */ @JsonProperty("id") @JsonPropertyDescription("The Applicants Reference") @NotNull private Integer id; /** * The Applicants Employment Status Code * (Required) * */ @JsonProperty("employmentStatus") @JsonPropertyDescription("The Applicants Employment Status Code") @Valid @NotNull private EmploymentStatus employmentStatus; protected final static Object NOT_FOUND_VALUE = new Object(); /** * No args constructor for use in serialization * */ public ApiApplicantDetails() { } /** * * @param id * @param employmentStatus */ public ApiApplicantDetails(Integer id, EmploymentStatus employmentStatus) { super(); this.id = id; this.employmentStatus = employmentStatus; } /** * The Applicants Reference * (Required) * */ @JsonProperty("id") public Integer getId() { return id; } /** * The Applicants Reference * (Required) * */ @JsonProperty("id") public void setId(Integer id) { this.id = id; } public ApiApplicantDetails withId(Integer id) { this.id = id; return this; } /** * The Applicants Employment Status Code * (Required) * */ @JsonProperty("employmentStatus") public EmploymentStatus getEmploymentStatus() { return employmentStatus; } /** * The Applicants Employment Status Code * (Required) * */ @JsonProperty("employmentStatus") public void setEmploymentStatus(EmploymentStatus employmentStatus) { this.employmentStatus = employmentStatus; } public ApiApplicantDetails withEmploymentStatus(EmploymentStatus employmentStatus) { this.employmentStatus = employmentStatus; 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 ("employmentStatus".equals(name)) { if (value instanceof EmploymentStatus) { setEmploymentStatus(((EmploymentStatus) value)); } else { throw new IllegalArgumentException(("property \"employmentStatus\" is of type \"uk.gov.justice.laa.crime.enums.EmploymentStatus\", 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 ("employmentStatus".equals(name)) { return getEmploymentStatus(); } else { return notFoundValue; } } } @SuppressWarnings({ "unchecked" }) publicT get(String name) { Object value = declaredPropertyOrNotFound(name, ApiApplicantDetails.NOT_FOUND_VALUE); if (ApiApplicantDetails.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 ApiApplicantDetails 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(ApiApplicantDetails.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("employmentStatus"); sb.append('='); sb.append(((this.employmentStatus == null)?"":this.employmentStatus)); 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.id == null)? 0 :this.id.hashCode())); result = ((result* 31)+((this.employmentStatus == null)? 0 :this.employmentStatus.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof ApiApplicantDetails) == false) { return false; } ApiApplicantDetails rhs = ((ApiApplicantDetails) other); return (((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id)))&&((this.employmentStatus == rhs.employmentStatus)||((this.employmentStatus!= null)&&this.employmentStatus.equals(rhs.employmentStatus)))); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy