tech.deepdreams.worker.api.dtos.DeductionDTO 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 java.util.ArrayList;
import java.util.List;
import tech.deepdreams.worker.api.dtos.ConstantDTO;
import tech.deepdreams.worker.api.dtos.CountryDTO;
import tech.deepdreams.worker.api.dtos.ElementDTO;
import tech.deepdreams.worker.api.dtos.GridItemDTO;
import tech.deepdreams.worker.api.dtos.StatusDTO;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* DeductionDTO
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-09-24T04:57:07.737051-04:00[America/Toronto]")
public class DeductionDTO {
@JsonProperty("id")
private Long id;
@JsonProperty("element")
private ElementDTO element;
@JsonProperty("country")
private CountryDTO country;
@JsonProperty("category")
private String category;
@JsonProperty("employeeStatus")
private StatusDTO employeeStatus;
@JsonProperty("formulaType")
private String formulaType;
@JsonProperty("amount")
private BigDecimal amount;
@JsonProperty("percentage")
private String percentage;
@JsonProperty("expression")
private String expression;
@JsonProperty("contributor")
private String contributor;
@JsonProperty("deductionBasis")
private ConstantDTO deductionBasis;
@JsonProperty("gridItems")
private List gridItems = null;
@JsonProperty("threshold")
private BigDecimal threshold;
@JsonProperty("ceiling")
private BigDecimal ceiling;
@JsonProperty("description")
private String description;
@JsonProperty("status")
private String status;
public DeductionDTO 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 DeductionDTO 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 DeductionDTO country(CountryDTO country) {
this.country = country;
return this;
}
/**
* Get country
* @return country
*/
@ApiModelProperty(value = "")
public CountryDTO getCountry() {
return country;
}
public void setCountry(CountryDTO country) {
this.country = country;
}
public DeductionDTO category(String category) {
this.category = category;
return this;
}
/**
* Get category
* @return category
*/
@ApiModelProperty(value = "")
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public DeductionDTO employeeStatus(StatusDTO employeeStatus) {
this.employeeStatus = employeeStatus;
return this;
}
/**
* Get employeeStatus
* @return employeeStatus
*/
@ApiModelProperty(value = "")
public StatusDTO getEmployeeStatus() {
return employeeStatus;
}
public void setEmployeeStatus(StatusDTO employeeStatus) {
this.employeeStatus = employeeStatus;
}
public DeductionDTO formulaType(String formulaType) {
this.formulaType = formulaType;
return this;
}
/**
* Get formulaType
* @return formulaType
*/
@ApiModelProperty(value = "")
public String getFormulaType() {
return formulaType;
}
public void setFormulaType(String formulaType) {
this.formulaType = formulaType;
}
public DeductionDTO amount(BigDecimal amount) {
this.amount = amount;
return this;
}
/**
* Get amount
* @return amount
*/
@ApiModelProperty(value = "")
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public DeductionDTO percentage(String percentage) {
this.percentage = percentage;
return this;
}
/**
* Get percentage
* @return percentage
*/
@ApiModelProperty(value = "")
public String getPercentage() {
return percentage;
}
public void setPercentage(String percentage) {
this.percentage = percentage;
}
public DeductionDTO expression(String expression) {
this.expression = expression;
return this;
}
/**
* Get expression
* @return expression
*/
@ApiModelProperty(value = "")
public String getExpression() {
return expression;
}
public void setExpression(String expression) {
this.expression = expression;
}
public DeductionDTO 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 DeductionDTO deductionBasis(ConstantDTO deductionBasis) {
this.deductionBasis = deductionBasis;
return this;
}
/**
* Get deductionBasis
* @return deductionBasis
*/
@ApiModelProperty(value = "")
public ConstantDTO getDeductionBasis() {
return deductionBasis;
}
public void setDeductionBasis(ConstantDTO deductionBasis) {
this.deductionBasis = deductionBasis;
}
public DeductionDTO gridItems(List gridItems) {
this.gridItems = gridItems;
return this;
}
public DeductionDTO addGridItemsItem(GridItemDTO gridItemsItem) {
if (this.gridItems == null) {
this.gridItems = new ArrayList<>();
}
this.gridItems.add(gridItemsItem);
return this;
}
/**
* Get gridItems
* @return gridItems
*/
@ApiModelProperty(value = "")
public List getGridItems() {
return gridItems;
}
public void setGridItems(List gridItems) {
this.gridItems = gridItems;
}
public DeductionDTO threshold(BigDecimal threshold) {
this.threshold = threshold;
return this;
}
/**
* Get threshold
* @return threshold
*/
@ApiModelProperty(value = "")
public BigDecimal getThreshold() {
return threshold;
}
public void setThreshold(BigDecimal threshold) {
this.threshold = threshold;
}
public DeductionDTO ceiling(BigDecimal ceiling) {
this.ceiling = ceiling;
return this;
}
/**
* Get ceiling
* @return ceiling
*/
@ApiModelProperty(value = "")
public BigDecimal getCeiling() {
return ceiling;
}
public void setCeiling(BigDecimal ceiling) {
this.ceiling = ceiling;
}
public DeductionDTO description(String description) {
this.description = description;
return this;
}
/**
* Get description
* @return description
*/
@ApiModelProperty(value = "")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public DeductionDTO status(String status) {
this.status = status;
return this;
}
/**
* Get status
* @return status
*/
@ApiModelProperty(value = "")
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeductionDTO deduction = (DeductionDTO) o;
return Objects.equals(this.id, deduction.id) &&
Objects.equals(this.element, deduction.element) &&
Objects.equals(this.country, deduction.country) &&
Objects.equals(this.category, deduction.category) &&
Objects.equals(this.employeeStatus, deduction.employeeStatus) &&
Objects.equals(this.formulaType, deduction.formulaType) &&
Objects.equals(this.amount, deduction.amount) &&
Objects.equals(this.percentage, deduction.percentage) &&
Objects.equals(this.expression, deduction.expression) &&
Objects.equals(this.contributor, deduction.contributor) &&
Objects.equals(this.deductionBasis, deduction.deductionBasis) &&
Objects.equals(this.gridItems, deduction.gridItems) &&
Objects.equals(this.threshold, deduction.threshold) &&
Objects.equals(this.ceiling, deduction.ceiling) &&
Objects.equals(this.description, deduction.description) &&
Objects.equals(this.status, deduction.status);
}
@Override
public int hashCode() {
return Objects.hash(id, element, country, category, employeeStatus, formulaType, amount, percentage, expression, contributor, deductionBasis, gridItems, threshold, ceiling, description, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeductionDTO {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" element: ").append(toIndentedString(element)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" employeeStatus: ").append(toIndentedString(employeeStatus)).append("\n");
sb.append(" formulaType: ").append(toIndentedString(formulaType)).append("\n");
sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
sb.append(" percentage: ").append(toIndentedString(percentage)).append("\n");
sb.append(" expression: ").append(toIndentedString(expression)).append("\n");
sb.append(" contributor: ").append(toIndentedString(contributor)).append("\n");
sb.append(" deductionBasis: ").append(toIndentedString(deductionBasis)).append("\n");
sb.append(" gridItems: ").append(toIndentedString(gridItems)).append("\n");
sb.append(" threshold: ").append(toIndentedString(threshold)).append("\n");
sb.append(" ceiling: ").append(toIndentedString(ceiling)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).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 ");
}
}