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;

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

public class InternetBaseConfigOpenApiVo   {
  @JsonProperty("preConfiguration")
  private Boolean preConfiguration;

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

  @JsonProperty("interval")
  private Integer interval;

  public InternetBaseConfigOpenApiVo preConfiguration(Boolean preConfiguration) {
    this.preConfiguration = preConfiguration;
    return this;
  }

  /**
   * All port and port-related(like ACL) configuration will take effect only when the parameter [preConfiguration] is true. The value will always be true when a gateway is in this site.
   * @return preConfiguration
  */
  @ApiModelProperty(required = true, value = "All port and port-related(like ACL) configuration will take effect only when the parameter [preConfiguration] is true. The value will always be true when a gateway is in this site.")
  @NotNull


  public Boolean getPreConfiguration() {
    return preConfiguration;
  }

  public void setPreConfiguration(Boolean preConfiguration) {
    this.preConfiguration = preConfiguration;
  }

  public InternetBaseConfigOpenApiVo wanPortList(List<String> wanPortList) {
    this.wanPortList = wanPortList;
    return this;
  }

  public InternetBaseConfigOpenApiVo addWanPortListItem(String wanPortListItem) {
    this.wanPortList.add(wanPortListItem);
    return this;
  }

  /**
   * List of enabled WAN port IDs, the valid port IDs can be obtained from \"Get internet basic info\".
   * @return wanPortList
  */
  @ApiModelProperty(required = true, value = "List of enabled WAN port IDs, the valid port IDs can be obtained from \"Get internet basic info\".")
  @NotNull


  public List<String> getWanPortList() {
    return wanPortList;
  }

  public void setWanPortList(List<String> wanPortList) {
    this.wanPortList = wanPortList;
  }

  public InternetBaseConfigOpenApiVo interval(Integer interval) {
    this.interval = interval;
    return this;
  }

  /**
   * Online detection interval(second). 0 means disable. It should be within the range of 0–3600.
   * @return interval
  */
  @ApiModelProperty(value = "Online detection interval(second). 0 means disable. It should be within the range of 0–3600.")


  public Integer getInterval() {
    return interval;
  }

  public void setInterval(Integer interval) {
    this.interval = interval;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    InternetBaseConfigOpenApiVo internetBaseConfigOpenApiVo = (InternetBaseConfigOpenApiVo) o;
    return Objects.equals(this.preConfiguration, internetBaseConfigOpenApiVo.preConfiguration) &&
        Objects.equals(this.wanPortList, internetBaseConfigOpenApiVo.wanPortList) &&
        Objects.equals(this.interval, internetBaseConfigOpenApiVo.interval);
  }

  @Override
  public int hashCode() {
    return Objects.hash(preConfiguration, wanPortList, interval);
  }

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

