tech.deepdreams.worker.api.dtos.DeductionItemDTO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worker-api Show documentation
Show all versions of worker-api Show documentation
Payroll Worker API project for Java 17
package tech.deepdreams.worker.api.dtos;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import tech.deepdreams.worker.api.dtos.ElementDTO;
import tech.deepdreams.worker.api.dtos.EmployeeDTO;
import tech.deepdreams.worker.api.dtos.PayPeriodDTO;
import tech.deepdreams.worker.api.dtos.PayslipDTO;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* DeductionItemDTO
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-09-14T12:54:23.701675700-04:00[America/Toronto]")
public class DeductionItemDTO {
@JsonProperty("id")
private Long id;
@JsonProperty("payPeriod")
private PayPeriodDTO payPeriod;
@JsonProperty("payslip")
private PayslipDTO payslip;
@JsonProperty("employee")
private EmployeeDTO employee;
@JsonProperty("element")
private ElementDTO element;
@JsonProperty("contributor")
private String contributor;
@JsonProperty("basisAmount")
private BigDecimal basisAmount;
@JsonProperty("employeeRate")
private Float employeeRate;
@JsonProperty("employeeAmount")
private BigDecimal employeeAmount;
@JsonProperty("employerRate")
private Float employerRate;
@JsonProperty("employerAmount")
private BigDecimal employerAmount;
@JsonProperty("totalAmount")
private BigDecimal totalAmount;
public DeductionItemDTO id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public DeductionItemDTO payPeriod(PayPeriodDTO payPeriod) {
this.payPeriod = payPeriod;
return this;
}
/**
* Get payPeriod
* @return payPeriod
*/
@ApiModelProperty(value = "")
public PayPeriodDTO getPayPeriod() {
return payPeriod;
}
public void setPayPeriod(PayPeriodDTO payPeriod) {
this.payPeriod = payPeriod;
}
public DeductionItemDTO payslip(PayslipDTO payslip) {
this.payslip = payslip;
return this;
}
/**
* Get payslip
* @return payslip
*/
@ApiModelProperty(value = "")
public PayslipDTO getPayslip() {
return payslip;
}
public void setPayslip(PayslipDTO payslip) {
this.payslip = payslip;
}
public DeductionItemDTO employee(EmployeeDTO employee) {
this.employee = employee;
return this;
}
/**
* Get employee
* @return employee
*/
@ApiModelProperty(value = "")
public EmployeeDTO getEmployee() {
return employee;
}
public void setEmployee(EmployeeDTO employee) {
this.employee = employee;
}
public DeductionItemDTO element(ElementDTO element) {
this.element = element;
return this;
}
/**
* Get element
* @return element
*/
@ApiModelProperty(value = "")
public ElementDTO getElement() {
return element;
}
public void setElement(ElementDTO element) {
this.element = element;
}
public DeductionItemDTO contributor(String contributor) {
this.contributor = contributor;
return this;
}
/**
* Get contributor
* @return contributor
*/
@ApiModelProperty(value = "")
public String getContributor() {
return contributor;
}
public void setContributor(String contributor) {
this.contributor = contributor;
}
public DeductionItemDTO basisAmount(BigDecimal basisAmount) {
this.basisAmount = basisAmount;
return this;
}
/**
* Get basisAmount
* @return basisAmount
*/
@ApiModelProperty(value = "")
public BigDecimal getBasisAmount() {
return basisAmount;
}
public void setBasisAmount(BigDecimal basisAmount) {
this.basisAmount = basisAmount;
}
public DeductionItemDTO employeeRate(Float employeeRate) {
this.employeeRate = employeeRate;
return this;
}
/**
* Get employeeRate
* @return employeeRate
*/
@ApiModelProperty(value = "")
public Float getEmployeeRate() {
return employeeRate;
}
public void setEmployeeRate(Float employeeRate) {
this.employeeRate = employeeRate;
}
public DeductionItemDTO employeeAmount(BigDecimal employeeAmount) {
this.employeeAmount = employeeAmount;
return this;
}
/**
* Get employeeAmount
* @return employeeAmount
*/
@ApiModelProperty(value = "")
public BigDecimal getEmployeeAmount() {
return employeeAmount;
}
public void setEmployeeAmount(BigDecimal employeeAmount) {
this.employeeAmount = employeeAmount;
}
public DeductionItemDTO employerRate(Float employerRate) {
this.employerRate = employerRate;
return this;
}
/**
* Get employerRate
* @return employerRate
*/
@ApiModelProperty(value = "")
public Float getEmployerRate() {
return employerRate;
}
public void setEmployerRate(Float employerRate) {
this.employerRate = employerRate;
}
public DeductionItemDTO employerAmount(BigDecimal employerAmount) {
this.employerAmount = employerAmount;
return this;
}
/**
* Get employerAmount
* @return employerAmount
*/
@ApiModelProperty(value = "")
public BigDecimal getEmployerAmount() {
return employerAmount;
}
public void setEmployerAmount(BigDecimal employerAmount) {
this.employerAmount = employerAmount;
}
public DeductionItemDTO totalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
return this;
}
/**
* Get totalAmount
* @return totalAmount
*/
@ApiModelProperty(value = "")
public BigDecimal getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeductionItemDTO deductionItem = (DeductionItemDTO) o;
return Objects.equals(this.id, deductionItem.id) &&
Objects.equals(this.payPeriod, deductionItem.payPeriod) &&
Objects.equals(this.payslip, deductionItem.payslip) &&
Objects.equals(this.employee, deductionItem.employee) &&
Objects.equals(this.element, deductionItem.element) &&
Objects.equals(this.contributor, deductionItem.contributor) &&
Objects.equals(this.basisAmount, deductionItem.basisAmount) &&
Objects.equals(this.employeeRate, deductionItem.employeeRate) &&
Objects.equals(this.employeeAmount, deductionItem.employeeAmount) &&
Objects.equals(this.employerRate, deductionItem.employerRate) &&
Objects.equals(this.employerAmount, deductionItem.employerAmount) &&
Objects.equals(this.totalAmount, deductionItem.totalAmount);
}
@Override
public int hashCode() {
return Objects.hash(id, payPeriod, payslip, employee, element, contributor, basisAmount, employeeRate, employeeAmount, employerRate, employerAmount, totalAmount);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeductionItemDTO {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" payPeriod: ").append(toIndentedString(payPeriod)).append("\n");
sb.append(" payslip: ").append(toIndentedString(payslip)).append("\n");
sb.append(" employee: ").append(toIndentedString(employee)).append("\n");
sb.append(" element: ").append(toIndentedString(element)).append("\n");
sb.append(" contributor: ").append(toIndentedString(contributor)).append("\n");
sb.append(" basisAmount: ").append(toIndentedString(basisAmount)).append("\n");
sb.append(" employeeRate: ").append(toIndentedString(employeeRate)).append("\n");
sb.append(" employeeAmount: ").append(toIndentedString(employeeAmount)).append("\n");
sb.append(" employerRate: ").append(toIndentedString(employerRate)).append("\n");
sb.append(" employerAmount: ").append(toIndentedString(employerAmount)).append("\n");
sb.append(" totalAmount: ").append(toIndentedString(totalAmount)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}