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

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

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

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

public class UpgradeScheduleQueryOpenApiVo   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("deviceMacs")
  @Valid
  private List<String> deviceMacs = new ArrayList<>();

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("nextExecuteTime")
  private Long nextExecuteTime;

  @JsonProperty("occurrenceTime")
  private BaseScheduleTimeOpenApiVo occurrenceTime;

  public UpgradeScheduleQueryOpenApiVo id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Reboot Schedule ID.
   * @return id
  */
  @ApiModelProperty(value = "Reboot Schedule ID.")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public UpgradeScheduleQueryOpenApiVo name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Reboot Schedule name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "Reboot Schedule name should contain 1 to 128 characters.")
  @NotNull

@Pattern(regexp="^[^ ]$|^[^ ].{0,126}[^ ]$") 
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public UpgradeScheduleQueryOpenApiVo status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * Reboot Schedule status.
   * @return status
  */
  @ApiModelProperty(required = true, value = "Reboot Schedule status.")
  @NotNull


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public UpgradeScheduleQueryOpenApiVo deviceMacs(List<String> deviceMacs) {
    this.deviceMacs = deviceMacs;
    return this;
  }

  public UpgradeScheduleQueryOpenApiVo addDeviceMacsItem(String deviceMacsItem) {
    this.deviceMacs.add(deviceMacsItem);
    return this;
  }

  /**
   * MAC address of the selected devices.
   * @return deviceMacs
  */
  @ApiModelProperty(required = true, value = "MAC address of the selected devices.")
  @NotNull


  public List<String> getDeviceMacs() {
    return deviceMacs;
  }

  public void setDeviceMacs(List<String> deviceMacs) {
    this.deviceMacs = deviceMacs;
  }

  public UpgradeScheduleQueryOpenApiVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Type should be a value as follows: 0: execute only once; 1: repeat
   * @return type
  */
  @ApiModelProperty(required = true, value = "Type should be a value as follows: 0: execute only once; 1: repeat")
  @NotNull


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

  public UpgradeScheduleQueryOpenApiVo nextExecuteTime(Long nextExecuteTime) {
    this.nextExecuteTime = nextExecuteTime;
    return this;
  }

  /**
   * Execution timeStamp(ms). Required when type is 0.
   * @return nextExecuteTime
  */
  @ApiModelProperty(value = "Execution timeStamp(ms). Required when type is 0.")


  public Long getNextExecuteTime() {
    return nextExecuteTime;
  }

  public void setNextExecuteTime(Long nextExecuteTime) {
    this.nextExecuteTime = nextExecuteTime;
  }

  public UpgradeScheduleQueryOpenApiVo occurrenceTime(BaseScheduleTimeOpenApiVo occurrenceTime) {
    this.occurrenceTime = occurrenceTime;
    return this;
  }

  /**
   * Get occurrenceTime
   * @return occurrenceTime
  */
  @ApiModelProperty(value = "")

  @Valid

  public BaseScheduleTimeOpenApiVo getOccurrenceTime() {
    return occurrenceTime;
  }

  public void setOccurrenceTime(BaseScheduleTimeOpenApiVo occurrenceTime) {
    this.occurrenceTime = occurrenceTime;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpgradeScheduleQueryOpenApiVo upgradeScheduleQueryOpenApiVo = (UpgradeScheduleQueryOpenApiVo) o;
    return Objects.equals(this.id, upgradeScheduleQueryOpenApiVo.id) &&
        Objects.equals(this.name, upgradeScheduleQueryOpenApiVo.name) &&
        Objects.equals(this.status, upgradeScheduleQueryOpenApiVo.status) &&
        Objects.equals(this.deviceMacs, upgradeScheduleQueryOpenApiVo.deviceMacs) &&
        Objects.equals(this.type, upgradeScheduleQueryOpenApiVo.type) &&
        Objects.equals(this.nextExecuteTime, upgradeScheduleQueryOpenApiVo.nextExecuteTime) &&
        Objects.equals(this.occurrenceTime, upgradeScheduleQueryOpenApiVo.occurrenceTime);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, status, deviceMacs, type, nextExecuteTime, occurrenceTime);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpgradeScheduleQueryOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    deviceMacs: ").append(toIndentedString(deviceMacs)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    nextExecuteTime: ").append(toIndentedString(nextExecuteTime)).append("\n");
    sb.append("    occurrenceTime: ").append(toIndentedString(occurrenceTime)).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    ");
  }
}

