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

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

public class VoipEmergencyNumberSetting   {
  @JsonProperty("emergencyNumberEnable")
  private Boolean emergencyNumberEnable;

  @JsonProperty("noOperationTime")
  private Integer noOperationTime;

  @JsonProperty("emergencyNumbers")
  @Valid
  private List<String> emergencyNumbers = null;

  public VoipEmergencyNumberSetting emergencyNumberEnable(Boolean emergencyNumberEnable) {
    this.emergencyNumberEnable = emergencyNumberEnable;
    return this;
  }

  /**
   * Whether to enable the emergency number.
   * @return emergencyNumberEnable
  */
  @ApiModelProperty(required = true, value = "Whether to enable the emergency number.")
  @NotNull


  public Boolean getEmergencyNumberEnable() {
    return emergencyNumberEnable;
  }

  public void setEmergencyNumberEnable(Boolean emergencyNumberEnable) {
    this.emergencyNumberEnable = emergencyNumberEnable;
  }

  public VoipEmergencyNumberSetting noOperationTime(Integer noOperationTime) {
    this.noOperationTime = noOperationTime;
    return this;
  }

  /**
   * No operation time should be within the range of 2-8s.
   * @return noOperationTime
  */
  @ApiModelProperty(value = "No operation time should be within the range of 2-8s.")


  public Integer getNoOperationTime() {
    return noOperationTime;
  }

  public void setNoOperationTime(Integer noOperationTime) {
    this.noOperationTime = noOperationTime;
  }

  public VoipEmergencyNumberSetting emergencyNumbers(List<String> emergencyNumbers) {
    this.emergencyNumbers = emergencyNumbers;
    return this;
  }

  public VoipEmergencyNumberSetting addEmergencyNumbersItem(String emergencyNumbersItem) {
    if (this.emergencyNumbers == null) {
      this.emergencyNumbers = new ArrayList<>();
    }
    this.emergencyNumbers.add(emergencyNumbersItem);
    return this;
  }

  /**
   * Emergency number list.
   * @return emergencyNumbers
  */
  @ApiModelProperty(value = "Emergency number list.")


  public List<String> getEmergencyNumbers() {
    return emergencyNumbers;
  }

  public void setEmergencyNumbers(List<String> emergencyNumbers) {
    this.emergencyNumbers = emergencyNumbers;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    VoipEmergencyNumberSetting voipEmergencyNumberSetting = (VoipEmergencyNumberSetting) o;
    return Objects.equals(this.emergencyNumberEnable, voipEmergencyNumberSetting.emergencyNumberEnable) &&
        Objects.equals(this.noOperationTime, voipEmergencyNumberSetting.noOperationTime) &&
        Objects.equals(this.emergencyNumbers, voipEmergencyNumberSetting.emergencyNumbers);
  }

  @Override
  public int hashCode() {
    return Objects.hash(emergencyNumberEnable, noOperationTime, emergencyNumbers);
  }

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

