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 javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class UpdateApPowerSavingConfigOpenApiVo   {
  @JsonProperty("timeEnable")
  private Boolean timeEnable;

  @JsonProperty("startTimeH")
  private Integer startTimeH;

  @JsonProperty("startTimeM")
  private Integer startTimeM;

  @JsonProperty("endTimeH")
  private Integer endTimeH;

  @JsonProperty("endTimeM")
  private Integer endTimeM;

  @JsonProperty("bandEnable")
  private Boolean bandEnable;

  @JsonProperty("bands")
  @Valid
  private List<Integer> bands = null;

  @JsonProperty("idleDuration")
  private Integer idleDuration;

  public UpdateApPowerSavingConfigOpenApiVo timeEnable(Boolean timeEnable) {
    this.timeEnable = timeEnable;
    return this;
  }

  /**
   * Power Saving trigger by time config status. True: enable, false: disable.
   * @return timeEnable
  */
  @ApiModelProperty(required = true, value = "Power Saving trigger by time config status. True: enable, false: disable.")
  @NotNull


  public Boolean getTimeEnable() {
    return timeEnable;
  }

  public void setTimeEnable(Boolean timeEnable) {
    this.timeEnable = timeEnable;
  }

  public UpdateApPowerSavingConfigOpenApiVo startTimeH(Integer startTimeH) {
    this.startTimeH = startTimeH;
    return this;
  }

  /**
   * Start time of trigger by time(unit: hour); It should be within the range of 0–23; This field is required when Parameter [timeEnable] is true.
   * @return startTimeH
  */
  @ApiModelProperty(value = "Start time of trigger by time(unit: hour); It should be within the range of 0–23; This field is required when Parameter [timeEnable] is true.")


  public Integer getStartTimeH() {
    return startTimeH;
  }

  public void setStartTimeH(Integer startTimeH) {
    this.startTimeH = startTimeH;
  }

  public UpdateApPowerSavingConfigOpenApiVo startTimeM(Integer startTimeM) {
    this.startTimeM = startTimeM;
    return this;
  }

  /**
   * Start time of trigger by time(unit: minute); It should be within the range of 0–59; This field is required when Parameter [timeEnable] is true.
   * @return startTimeM
  */
  @ApiModelProperty(value = "Start time of trigger by time(unit: minute); It should be within the range of 0–59; This field is required when Parameter [timeEnable] is true.")


  public Integer getStartTimeM() {
    return startTimeM;
  }

  public void setStartTimeM(Integer startTimeM) {
    this.startTimeM = startTimeM;
  }

  public UpdateApPowerSavingConfigOpenApiVo endTimeH(Integer endTimeH) {
    this.endTimeH = endTimeH;
    return this;
  }

  /**
   * End time of trigger by time(unit: hour); It should be within the range of 0–23; This field is required when Parameter [timeEnable] is true.
   * @return endTimeH
  */
  @ApiModelProperty(value = "End time of trigger by time(unit: hour); It should be within the range of 0–23; This field is required when Parameter [timeEnable] is true.")


  public Integer getEndTimeH() {
    return endTimeH;
  }

  public void setEndTimeH(Integer endTimeH) {
    this.endTimeH = endTimeH;
  }

  public UpdateApPowerSavingConfigOpenApiVo endTimeM(Integer endTimeM) {
    this.endTimeM = endTimeM;
    return this;
  }

  /**
   * End time of trigger by time(unit: minute); It should be within the range of 0–59; This field is required when Parameter [timeEnable] is true.
   * @return endTimeM
  */
  @ApiModelProperty(value = "End time of trigger by time(unit: minute); It should be within the range of 0–59; This field is required when Parameter [timeEnable] is true.")


  public Integer getEndTimeM() {
    return endTimeM;
  }

  public void setEndTimeM(Integer endTimeM) {
    this.endTimeM = endTimeM;
  }

  public UpdateApPowerSavingConfigOpenApiVo bandEnable(Boolean bandEnable) {
    this.bandEnable = bandEnable;
    return this;
  }

  /**
   * Power Saving trigger by band config status. True: enable, false: disable.
   * @return bandEnable
  */
  @ApiModelProperty(required = true, value = "Power Saving trigger by band config status. True: enable, false: disable.")
  @NotNull


  public Boolean getBandEnable() {
    return bandEnable;
  }

  public void setBandEnable(Boolean bandEnable) {
    this.bandEnable = bandEnable;
  }

  public UpdateApPowerSavingConfigOpenApiVo bands(List<Integer> bands) {
    this.bands = bands;
    return this;
  }

  public UpdateApPowerSavingConfigOpenApiVo addBandsItem(Integer bandsItem) {
    if (this.bands == null) {
      this.bands = new ArrayList<>();
    }
    this.bands.add(bandsItem);
    return this;
  }

  /**
   * Select bands list config of trigger by band;It should be a value as follows: 0: 2.4GHz; 1: 5GHz; 2: 5G2Hz; 3: 6GHz;This field is required when Parameter [bandEnable] is true;Please note that the band filled in must be supported by the device, otherwise the modified configuration will not take effect properly
   * @return bands
  */
  @ApiModelProperty(value = "Select bands list config of trigger by band;It should be a value as follows: 0: 2.4GHz; 1: 5GHz; 2: 5G2Hz; 3: 6GHz;This field is required when Parameter [bandEnable] is true;Please note that the band filled in must be supported by the device, otherwise the modified configuration will not take effect properly")

@Size(min=1,max=2147483647) 
  public List<Integer> getBands() {
    return bands;
  }

  public void setBands(List<Integer> bands) {
    this.bands = bands;
  }

  public UpdateApPowerSavingConfigOpenApiVo idleDuration(Integer idleDuration) {
    this.idleDuration = idleDuration;
    return this;
  }

  /**
   * Idle duration config of trigger by band(unit: minute); It should be within the range of 60–1440; This field is required when Parameter [bandEnable] is true.
   * @return idleDuration
  */
  @ApiModelProperty(value = "Idle duration config of trigger by band(unit: minute); It should be within the range of 60–1440; This field is required when Parameter [bandEnable] is true.")


  public Integer getIdleDuration() {
    return idleDuration;
  }

  public void setIdleDuration(Integer idleDuration) {
    this.idleDuration = idleDuration;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UpdateApPowerSavingConfigOpenApiVo updateApPowerSavingConfigOpenApiVo = (UpdateApPowerSavingConfigOpenApiVo) o;
    return Objects.equals(this.timeEnable, updateApPowerSavingConfigOpenApiVo.timeEnable) &&
        Objects.equals(this.startTimeH, updateApPowerSavingConfigOpenApiVo.startTimeH) &&
        Objects.equals(this.startTimeM, updateApPowerSavingConfigOpenApiVo.startTimeM) &&
        Objects.equals(this.endTimeH, updateApPowerSavingConfigOpenApiVo.endTimeH) &&
        Objects.equals(this.endTimeM, updateApPowerSavingConfigOpenApiVo.endTimeM) &&
        Objects.equals(this.bandEnable, updateApPowerSavingConfigOpenApiVo.bandEnable) &&
        Objects.equals(this.bands, updateApPowerSavingConfigOpenApiVo.bands) &&
        Objects.equals(this.idleDuration, updateApPowerSavingConfigOpenApiVo.idleDuration);
  }

  @Override
  public int hashCode() {
    return Objects.hash(timeEnable, startTimeH, startTimeM, endTimeH, endTimeM, bandEnable, bands, idleDuration);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class UpdateApPowerSavingConfigOpenApiVo {\n");
    
    sb.append("    timeEnable: ").append(toIndentedString(timeEnable)).append("\n");
    sb.append("    startTimeH: ").append(toIndentedString(startTimeH)).append("\n");
    sb.append("    startTimeM: ").append(toIndentedString(startTimeM)).append("\n");
    sb.append("    endTimeH: ").append(toIndentedString(endTimeH)).append("\n");
    sb.append("    endTimeM: ").append(toIndentedString(endTimeM)).append("\n");
    sb.append("    bandEnable: ").append(toIndentedString(bandEnable)).append("\n");
    sb.append("    bands: ").append(toIndentedString(bands)).append("\n");
    sb.append("    idleDuration: ").append(toIndentedString(idleDuration)).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    ");
  }
}

