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;

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

public class RebootScheduleOpenApiVo   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Boolean status;

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

  @JsonProperty("time")
  private RebootScheduleTimeOpenApiVo time;

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

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

  /**
   * MAC address of the selected devices. E.g. AA-BB-CC-DD-11-22
   * @return deviceMacs
  */
  @ApiModelProperty(required = true, value = "MAC address of the selected devices. E.g. AA-BB-CC-DD-11-22")
  @NotNull


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

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

  public RebootScheduleOpenApiVo 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;
  }


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

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RebootScheduleOpenApiVo {\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("}");
    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    ");
  }
}

