package org.wfc.omada.api.device.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.Objects;

/**
 * Periodic execution time, and it should not be null
 */
@ApiModel(description = "Periodic execution time, and it should not be null")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:26:25.576+08:00[Asia/Shanghai]")

public class UpgradeBaseScheduleTimeOpenApiVo   {
  @JsonProperty("timingType")
  private Integer timingType;

  @JsonProperty("dayOfWeek")
  private Integer dayOfWeek;

  @JsonProperty("dayOfMonth")
  private Integer dayOfMonth;

  @JsonProperty("monthOfYear")
  private Integer monthOfYear;

  @JsonProperty("hour")
  private Integer hour;

  @JsonProperty("minute")
  private Integer minute;

  public UpgradeBaseScheduleTimeOpenApiVo timingType(Integer timingType) {
    this.timingType = timingType;
    return this;
  }

  /**
   * Time type should be a value as follows: 1:Daily; 2:Weekly; 3:Monthly; 4:yearly
   * @return timingType
  */
  @ApiModelProperty(required = true, value = "Time type should be a value as follows: 1:Daily; 2:Weekly; 3:Monthly; 4:yearly")
  @NotNull


  public Integer getTimingType() {
    return timingType;
  }

  public void setTimingType(Integer timingType) {
    this.timingType = timingType;
  }

  public UpgradeBaseScheduleTimeOpenApiVo dayOfWeek(Integer dayOfWeek) {
    this.dayOfWeek = dayOfWeek;
    return this;
  }

  /**
   * It should be within the range of 0(Sunday)~6(Saturday). Required when parameter [timingType] is 2.
   * @return dayOfWeek
  */
  @ApiModelProperty(value = "It should be within the range of 0(Sunday)~6(Saturday). Required when parameter [timingType] is 2.")


  public Integer getDayOfWeek() {
    return dayOfWeek;
  }

  public void setDayOfWeek(Integer dayOfWeek) {
    this.dayOfWeek = dayOfWeek;
  }

  public UpgradeBaseScheduleTimeOpenApiVo dayOfMonth(Integer dayOfMonth) {
    this.dayOfMonth = dayOfMonth;
    return this;
  }

  /**
   * It should be within the range of 1~31. Required when parameter [timingType] is 3 or 4.
   * @return dayOfMonth
  */
  @ApiModelProperty(value = "It should be within the range of 1~31. Required when parameter [timingType] is 3 or 4.")


  public Integer getDayOfMonth() {
    return dayOfMonth;
  }

  public void setDayOfMonth(Integer dayOfMonth) {
    this.dayOfMonth = dayOfMonth;
  }

  public UpgradeBaseScheduleTimeOpenApiVo monthOfYear(Integer monthOfYear) {
    this.monthOfYear = monthOfYear;
    return this;
  }

  /**
   * It should be within the range of 1~12. Required when parameter [timingType] is 4.
   * @return monthOfYear
  */
  @ApiModelProperty(value = "It should be within the range of 1~12. Required when parameter [timingType] is 4.")


  public Integer getMonthOfYear() {
    return monthOfYear;
  }

  public void setMonthOfYear(Integer monthOfYear) {
    this.monthOfYear = monthOfYear;
  }

  public UpgradeBaseScheduleTimeOpenApiVo hour(Integer hour) {
    this.hour = hour;
    return this;
  }

  /**
   * It should be within the range of 0~23
   * @return hour
  */
  @ApiModelProperty(required = true, value = "It should be within the range of 0~23")
  @NotNull


  public Integer getHour() {
    return hour;
  }

  public void setHour(Integer hour) {
    this.hour = hour;
  }

  public UpgradeBaseScheduleTimeOpenApiVo minute(Integer minute) {
    this.minute = minute;
    return this;
  }

  /**
   * It should be within the range of 0~59
   * @return minute
  */
  @ApiModelProperty(required = true, value = "It should be within the range of 0~59")
  @NotNull


  public Integer getMinute() {
    return minute;
  }

  public void setMinute(Integer minute) {
    this.minute = minute;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpgradeBaseScheduleTimeOpenApiVo upgradeBaseScheduleTimeOpenApiVo = (UpgradeBaseScheduleTimeOpenApiVo) o;
    return Objects.equals(this.timingType, upgradeBaseScheduleTimeOpenApiVo.timingType) &&
        Objects.equals(this.dayOfWeek, upgradeBaseScheduleTimeOpenApiVo.dayOfWeek) &&
        Objects.equals(this.dayOfMonth, upgradeBaseScheduleTimeOpenApiVo.dayOfMonth) &&
        Objects.equals(this.monthOfYear, upgradeBaseScheduleTimeOpenApiVo.monthOfYear) &&
        Objects.equals(this.hour, upgradeBaseScheduleTimeOpenApiVo.hour) &&
        Objects.equals(this.minute, upgradeBaseScheduleTimeOpenApiVo.minute);
  }

  @Override
  public int hashCode() {
    return Objects.hash(timingType, dayOfWeek, dayOfMonth, monthOfYear, hour, minute);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpgradeBaseScheduleTimeOpenApiVo {\n");
    
    sb.append("    timingType: ").append(toIndentedString(timingType)).append("\n");
    sb.append("    dayOfWeek: ").append(toIndentedString(dayOfWeek)).append("\n");
    sb.append("    dayOfMonth: ").append(toIndentedString(dayOfMonth)).append("\n");
    sb.append("    monthOfYear: ").append(toIndentedString(monthOfYear)).append("\n");
    sb.append("    hour: ").append(toIndentedString(hour)).append("\n");
    sb.append("    minute: ").append(toIndentedString(minute)).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    ");
  }
}

