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;

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

public class RebootScheduleQueryOpenApiVo   {
  @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("time")
  private RebootScheduleTimeOpenApiVo time;

  @JsonProperty("nextExecute")
  private Long nextExecute;

  public RebootScheduleQueryOpenApiVo 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 RebootScheduleQueryOpenApiVo 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 RebootScheduleQueryOpenApiVo 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 RebootScheduleQueryOpenApiVo deviceMacs(List<String> deviceMacs) {
    this.deviceMacs = deviceMacs;
    return this;
  }

  public RebootScheduleQueryOpenApiVo 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 RebootScheduleQueryOpenApiVo time(RebootScheduleTimeOpenApiVo time) {
    this.time = time;
    return this;
  }

  /**
   * Get time
   * @return time
  */
  @ApiModelProperty(required = true, value = "")
  @NotNull

  @Valid

  public RebootScheduleTimeOpenApiVo getTime() {
    return time;
  }

  public void setTime(RebootScheduleTimeOpenApiVo time) {
    this.time = time;
  }

  public RebootScheduleQueryOpenApiVo nextExecute(Long nextExecute) {
    this.nextExecute = nextExecute;
    return this;
  }

  /**
   * Reboot Schedule next execution timestamp(ms).
   * @return nextExecute
  */
  @ApiModelProperty(value = "Reboot Schedule next execution timestamp(ms).")


  public Long getNextExecute() {
    return nextExecute;
  }

  public void setNextExecute(Long nextExecute) {
    this.nextExecute = nextExecute;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RebootScheduleQueryOpenApiVo rebootScheduleQueryOpenApiVo = (RebootScheduleQueryOpenApiVo) o;
    return Objects.equals(this.id, rebootScheduleQueryOpenApiVo.id) &&
        Objects.equals(this.name, rebootScheduleQueryOpenApiVo.name) &&
        Objects.equals(this.status, rebootScheduleQueryOpenApiVo.status) &&
        Objects.equals(this.deviceMacs, rebootScheduleQueryOpenApiVo.deviceMacs) &&
        Objects.equals(this.time, rebootScheduleQueryOpenApiVo.time) &&
        Objects.equals(this.nextExecute, rebootScheduleQueryOpenApiVo.nextExecute);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, status, deviceMacs, time, nextExecute);
  }

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

