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;

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

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

  @JsonProperty("gatewayModel")
  private Integer gatewayModel;

  @JsonProperty("portList")
  @Valid
  private List<InternetBasicInfo> portList = new ArrayList<>();

  @JsonProperty("interval")
  private Integer interval;

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

  /**
   * You can pre-configure the model-relative settings when it is true.
   * @return preConfiguration
  */
  @ApiModelProperty(required = true, value = "You can pre-configure the model-relative settings when it is true.")
  @NotNull


  public Boolean getPreConfiguration() {
    return preConfiguration;
  }

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

  public InternetBaseInfoOpenApiVo gatewayModel(Integer gatewayModel) {
    this.gatewayModel = gatewayModel;
    return this;
  }

  /**
   * Gateway model. The model number refers to function can be obtained from 'Get supported gateway model list for pre-configuration' interface.
   * @return gatewayModel
  */
  @ApiModelProperty(required = true, value = "Gateway model. The model number refers to function can be obtained from 'Get supported gateway model list for pre-configuration' interface.")
  @NotNull


  public Integer getGatewayModel() {
    return gatewayModel;
  }

  public void setGatewayModel(Integer gatewayModel) {
    this.gatewayModel = gatewayModel;
  }

  public InternetBaseInfoOpenApiVo portList(List<InternetBasicInfo> portList) {
    this.portList = portList;
    return this;
  }

  public InternetBaseInfoOpenApiVo addPortListItem(InternetBasicInfo portListItem) {
    this.portList.add(portListItem);
    return this;
  }

  /**
   * Port info list
   * @return portList
  */
  @ApiModelProperty(required = true, value = "Port info list")
  @NotNull

  @Valid

  public List<InternetBasicInfo> getPortList() {
    return portList;
  }

  public void setPortList(List<InternetBasicInfo> portList) {
    this.portList = portList;
  }

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

  /**
   * Online detection interval(second), 0 means disable.
   * @return interval
  */
  @ApiModelProperty(required = true, value = "Online detection interval(second), 0 means disable.")
  @NotNull


  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;
    }
    InternetBaseInfoOpenApiVo internetBaseInfoOpenApiVo = (InternetBaseInfoOpenApiVo) o;
    return Objects.equals(this.preConfiguration, internetBaseInfoOpenApiVo.preConfiguration) &&
        Objects.equals(this.gatewayModel, internetBaseInfoOpenApiVo.gatewayModel) &&
        Objects.equals(this.portList, internetBaseInfoOpenApiVo.portList) &&
        Objects.equals(this.interval, internetBaseInfoOpenApiVo.interval);
  }

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

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

