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

tech.deepdreams.worker.api.dtos.WorkingHoursDTO Maven / Gradle / Ivy

There is a newer version: 0.1.1-RELEASE
Show newest version
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.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import tech.deepdreams.worker.api.dtos.OvertimeHoursDTO;
import org.openapitools.jackson.nullable.JsonNullable;

/**
 * WorkingHoursDTO
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-09-20T05:23:49.528005100-04:00[America/Toronto]")
public class WorkingHoursDTO   {
  @JsonProperty("employeeId")
  private Long employeeId;

  @JsonProperty("startDate")
  @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
  private LocalDate startDate;

  @JsonProperty("endDate")
  @org.springframework.format.annotation.DateTimeFormat(iso = org.springframework.format.annotation.DateTimeFormat.ISO.DATE)
  private LocalDate endDate;

  @JsonProperty("totalWorkingHours")
  private Double totalWorkingHours;

  @JsonProperty("regularWorkingHours")
  private Double regularWorkingHours;

  @JsonProperty("overtimeHours")
  
  private List overtimeHours = null;

  public WorkingHoursDTO employeeId(Long employeeId) {
    this.employeeId = employeeId;
    return this;
  }

  /**
   * Get employeeId
   * @return employeeId
  */
  @ApiModelProperty(value = "")
  public Long getEmployeeId() {
    return employeeId;
  }

  public void setEmployeeId(Long employeeId) {
    this.employeeId = employeeId;
  }

  public WorkingHoursDTO startDate(LocalDate startDate) {
    this.startDate = startDate;
    return this;
  }

  /**
   * Get startDate
   * @return startDate
  */
  @ApiModelProperty(value = "")
  public LocalDate getStartDate() {
    return startDate;
  }

  public void setStartDate(LocalDate startDate) {
    this.startDate = startDate;
  }

  public WorkingHoursDTO endDate(LocalDate endDate) {
    this.endDate = endDate;
    return this;
  }

  /**
   * Get endDate
   * @return endDate
  */
  @ApiModelProperty(value = "")
  public LocalDate getEndDate() {
    return endDate;
  }

  public void setEndDate(LocalDate endDate) {
    this.endDate = endDate;
  }

  public WorkingHoursDTO totalWorkingHours(Double totalWorkingHours) {
    this.totalWorkingHours = totalWorkingHours;
    return this;
  }

  /**
   * Get totalWorkingHours
   * @return totalWorkingHours
  */
  @ApiModelProperty(value = "")
  public Double getTotalWorkingHours() {
    return totalWorkingHours;
  }

  public void setTotalWorkingHours(Double totalWorkingHours) {
    this.totalWorkingHours = totalWorkingHours;
  }

  public WorkingHoursDTO regularWorkingHours(Double regularWorkingHours) {
    this.regularWorkingHours = regularWorkingHours;
    return this;
  }

  /**
   * Get regularWorkingHours
   * @return regularWorkingHours
  */
  @ApiModelProperty(value = "")
  public Double getRegularWorkingHours() {
    return regularWorkingHours;
  }

  public void setRegularWorkingHours(Double regularWorkingHours) {
    this.regularWorkingHours = regularWorkingHours;
  }

  public WorkingHoursDTO overtimeHours(List overtimeHours) {
    this.overtimeHours = overtimeHours;
    return this;
  }

  public WorkingHoursDTO addOvertimeHoursItem(OvertimeHoursDTO overtimeHoursItem) {
    if (this.overtimeHours == null) {
      this.overtimeHours = new ArrayList<>();
    }
    this.overtimeHours.add(overtimeHoursItem);
    return this;
  }

  /**
   * Get overtimeHours
   * @return overtimeHours
  */
  @ApiModelProperty(value = "")
  public List getOvertimeHours() {
    return overtimeHours;
  }

  public void setOvertimeHours(List overtimeHours) {
    this.overtimeHours = overtimeHours;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    WorkingHoursDTO workingHours = (WorkingHoursDTO) o;
    return Objects.equals(this.employeeId, workingHours.employeeId) &&
        Objects.equals(this.startDate, workingHours.startDate) &&
        Objects.equals(this.endDate, workingHours.endDate) &&
        Objects.equals(this.totalWorkingHours, workingHours.totalWorkingHours) &&
        Objects.equals(this.regularWorkingHours, workingHours.regularWorkingHours) &&
        Objects.equals(this.overtimeHours, workingHours.overtimeHours);
  }

  @Override
  public int hashCode() {
    return Objects.hash(employeeId, startDate, endDate, totalWorkingHours, regularWorkingHours, overtimeHours);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class WorkingHoursDTO {\n");
    
    sb.append("    employeeId: ").append(toIndentedString(employeeId)).append("\n");
    sb.append("    startDate: ").append(toIndentedString(startDate)).append("\n");
    sb.append("    endDate: ").append(toIndentedString(endDate)).append("\n");
    sb.append("    totalWorkingHours: ").append(toIndentedString(totalWorkingHours)).append("\n");
    sb.append("    regularWorkingHours: ").append(toIndentedString(regularWorkingHours)).append("\n");
    sb.append("    overtimeHours: ").append(toIndentedString(overtimeHours)).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    ");
  }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy