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

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

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

/**
 * RollbackCreateInfo
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:26:25.576+08:00[Asia/Shanghai]")

public class RollbackCreateInfo   {
  @JsonProperty("year")
  private Integer year;

  @JsonProperty("monthOfYear")
  private Integer monthOfYear;

  @JsonProperty("dayOfMonth")
  private Integer dayOfMonth;

  @JsonProperty("hour")
  private Integer hour;

  @JsonProperty("minute")
  private Integer minute;

  @JsonProperty("scheduleType")
  private Integer scheduleType;

  @JsonProperty("targetVersion")
  private String targetVersion;

  public RollbackCreateInfo year(Integer year) {
    this.year = year;
    return this;
  }

  /**
   * User selected year
   * @return year
  */
  @ApiModelProperty(value = "User selected year")


  public Integer getYear() {
    return year;
  }

  public void setYear(Integer year) {
    this.year = year;
  }

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

  /**
   * The month of the year selected by the user, It should be within the range of 1-12
   * @return monthOfYear
  */
  @ApiModelProperty(value = "The month of the year selected by the user, It should be within the range of 1-12")


  public Integer getMonthOfYear() {
    return monthOfYear;
  }

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

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

  /**
   * The day of the month selected by the user, It should be within the range of 1-31
   * @return dayOfMonth
  */
  @ApiModelProperty(value = "The day of the month selected by the user, It should be within the range of 1-31")


  public Integer getDayOfMonth() {
    return dayOfMonth;
  }

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

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

  /**
   * The hour selected by the user, It should be within the range of 0-23
   * @return hour
  */
  @ApiModelProperty(value = "The hour selected by the user, It should be within the range of 0-23")


  public Integer getHour() {
    return hour;
  }

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

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

  /**
   * The minute selected by the user, It should be within the range of 0-59
   * @return minute
  */
  @ApiModelProperty(value = "The minute selected by the user, It should be within the range of 0-59")


  public Integer getMinute() {
    return minute;
  }

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

  public RollbackCreateInfo scheduleType(Integer scheduleType) {
    this.scheduleType = scheduleType;
    return this;
  }

  /**
   * The type of execution time for the upgrade, where 0 represents now and 1 represents the specified time
   * @return scheduleType
  */
  @ApiModelProperty(required = true, value = "The type of execution time for the upgrade, where 0 represents now and 1 represents the specified time")
  @NotNull


  public Integer getScheduleType() {
    return scheduleType;
  }

  public void setScheduleType(Integer scheduleType) {
    this.scheduleType = scheduleType;
  }

  public RollbackCreateInfo targetVersion(String targetVersion) {
    this.targetVersion = targetVersion;
    return this;
  }

  /**
   * User selected rollback version, It should not be null
   * @return targetVersion
  */
  @ApiModelProperty(required = true, value = "User selected rollback version, It should not be null")
  @NotNull


  public String getTargetVersion() {
    return targetVersion;
  }

  public void setTargetVersion(String targetVersion) {
    this.targetVersion = targetVersion;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RollbackCreateInfo rollbackCreateInfo = (RollbackCreateInfo) o;
    return Objects.equals(this.year, rollbackCreateInfo.year) &&
        Objects.equals(this.monthOfYear, rollbackCreateInfo.monthOfYear) &&
        Objects.equals(this.dayOfMonth, rollbackCreateInfo.dayOfMonth) &&
        Objects.equals(this.hour, rollbackCreateInfo.hour) &&
        Objects.equals(this.minute, rollbackCreateInfo.minute) &&
        Objects.equals(this.scheduleType, rollbackCreateInfo.scheduleType) &&
        Objects.equals(this.targetVersion, rollbackCreateInfo.targetVersion);
  }

  @Override
  public int hashCode() {
    return Objects.hash(year, monthOfYear, dayOfMonth, hour, minute, scheduleType, targetVersion);
  }

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

