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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class PlanUpgradeCreateInfo   {
  @JsonProperty("sites")
  @Valid
  private List<String> sites = new ArrayList<>();

  @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("modelList")
  @Valid
  private List<PlanUpgradeSelectedModel> modelList = new ArrayList<>();

  @JsonProperty("scheduleType")
  private Integer scheduleType;

  public PlanUpgradeCreateInfo sites(List<String> sites) {
    this.sites = sites;
    return this;
  }

  public PlanUpgradeCreateInfo addSitesItem(String sitesItem) {
    this.sites.add(sitesItem);
    return this;
  }

  /**
   * List of site ID selected by the user
   * @return sites
  */
  @ApiModelProperty(required = true, value = "List of site ID selected by the user")
  @NotNull


  public List<String> getSites() {
    return sites;
  }

  public void setSites(List<String> sites) {
    this.sites = sites;
  }

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

  /**
   * The year selected by the user
   * @return year
  */
  @ApiModelProperty(value = "The year selected by the user")


  public Integer getYear() {
    return year;
  }

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

  public PlanUpgradeCreateInfo 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 PlanUpgradeCreateInfo 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 PlanUpgradeCreateInfo hour(Integer hour) {
    this.hour = hour;
    return this;
  }

  /**
   * The hour of the day selected by the user, It should be within the range of 0-23
   * @return hour
  */
  @ApiModelProperty(value = "The hour of the day 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 PlanUpgradeCreateInfo minute(Integer minute) {
    this.minute = minute;
    return this;
  }

  /**
   * The minute in the hour selected by the user, It should be within the range of 0-59
   * @return minute
  */
  @ApiModelProperty(value = "The minute in the hour 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 PlanUpgradeCreateInfo modelList(List<PlanUpgradeSelectedModel> modelList) {
    this.modelList = modelList;
    return this;
  }

  public PlanUpgradeCreateInfo addModelListItem(PlanUpgradeSelectedModel modelListItem) {
    this.modelList.add(modelListItem);
    return this;
  }

  /**
   * List of model selected for planned upgrade
   * @return modelList
  */
  @ApiModelProperty(required = true, value = "List of model selected for planned upgrade")
  @NotNull

  @Valid

  public List<PlanUpgradeSelectedModel> getModelList() {
    return modelList;
  }

  public void setModelList(List<PlanUpgradeSelectedModel> modelList) {
    this.modelList = modelList;
  }

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

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


  public Integer getScheduleType() {
    return scheduleType;
  }

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


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

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PlanUpgradeCreateInfo {\n");
    
    sb.append("    sites: ").append(toIndentedString(sites)).append("\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("    modelList: ").append(toIndentedString(modelList)).append("\n");
    sb.append("    scheduleType: ").append(toIndentedString(scheduleType)).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    ");
  }
}

