package org.wfc.omada.api.device.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import java.util.Objects;

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

public class GatewayWanStatusEntity   {
  @JsonProperty("port")
  private Integer port;

  @JsonProperty("name")
  private String name;

  @JsonProperty("portDesc")
  private String portDesc;

  @JsonProperty("status")
  private Integer status;

  @JsonProperty("internetState")
  private Integer internetState;

  @JsonProperty("wanPortIpv6Config")
  private OsgWanPortIpv6ConfigVo wanPortIpv6Config;

  @JsonProperty("wanPortIpv4Config")
  private OsgWanPortIpv4ConfigVo wanPortIpv4Config;

  @JsonProperty("rxRate")
  private Long rxRate;

  @JsonProperty("txRate")
  private Long txRate;

  @JsonProperty("latency")
  private Integer latency;

  @JsonProperty("loss")
  private Double loss;

  @JsonProperty("onlineDetection")
  private Integer onlineDetection;

  public GatewayWanStatusEntity port(Integer port) {
    this.port = port;
    return this;
  }

  /**
   * Port serial number
   * @return port
  */
  @ApiModelProperty(value = "Port serial number")


  public Integer getPort() {
    return port;
  }

  public void setPort(Integer port) {
    this.port = port;
  }

  public GatewayWanStatusEntity name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Port name
   * @return name
  */
  @ApiModelProperty(value = "Port name")


  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public GatewayWanStatusEntity portDesc(String portDesc) {
    this.portDesc = portDesc;
    return this;
  }

  /**
   * Port description
   * @return portDesc
  */
  @ApiModelProperty(value = "Port description")


  public String getPortDesc() {
    return portDesc;
  }

  public void setPortDesc(String portDesc) {
    this.portDesc = portDesc;
  }

  public GatewayWanStatusEntity status(Integer status) {
    this.status = status;
    return this;
  }

  /**
   * Port status should be a value as follows: 0: disconnected; 1: connected
   * @return status
  */
  @ApiModelProperty(value = "Port status should be a value as follows: 0: disconnected; 1: connected")


  public Integer getStatus() {
    return status;
  }

  public void setStatus(Integer status) {
    this.status = status;
  }

  public GatewayWanStatusEntity internetState(Integer internetState) {
    this.internetState = internetState;
    return this;
  }

  /**
   * Wan internet state should be a value as follows: 0: disconnected; 1: connected
   * @return internetState
  */
  @ApiModelProperty(value = "Wan internet state should be a value as follows: 0: disconnected; 1: connected")


  public Integer getInternetState() {
    return internetState;
  }

  public void setInternetState(Integer internetState) {
    this.internetState = internetState;
  }

  public GatewayWanStatusEntity wanPortIpv6Config(OsgWanPortIpv6ConfigVo wanPortIpv6Config) {
    this.wanPortIpv6Config = wanPortIpv6Config;
    return this;
  }

  /**
   * Get wanPortIpv6Config
   * @return wanPortIpv6Config
  */
  @ApiModelProperty(value = "")

  @Valid

  public OsgWanPortIpv6ConfigVo getWanPortIpv6Config() {
    return wanPortIpv6Config;
  }

  public void setWanPortIpv6Config(OsgWanPortIpv6ConfigVo wanPortIpv6Config) {
    this.wanPortIpv6Config = wanPortIpv6Config;
  }

  public GatewayWanStatusEntity wanPortIpv4Config(OsgWanPortIpv4ConfigVo wanPortIpv4Config) {
    this.wanPortIpv4Config = wanPortIpv4Config;
    return this;
  }

  /**
   * Get wanPortIpv4Config
   * @return wanPortIpv4Config
  */
  @ApiModelProperty(value = "")

  @Valid

  public OsgWanPortIpv4ConfigVo getWanPortIpv4Config() {
    return wanPortIpv4Config;
  }

  public void setWanPortIpv4Config(OsgWanPortIpv4ConfigVo wanPortIpv4Config) {
    this.wanPortIpv4Config = wanPortIpv4Config;
  }

  public GatewayWanStatusEntity rxRate(Long rxRate) {
    this.rxRate = rxRate;
    return this;
  }

  /**
   * Port rx rate, Unit: KB/s;
   * @return rxRate
  */
  @ApiModelProperty(value = "Port rx rate, Unit: KB/s;")


  public Long getRxRate() {
    return rxRate;
  }

  public void setRxRate(Long rxRate) {
    this.rxRate = rxRate;
  }

  public GatewayWanStatusEntity txRate(Long txRate) {
    this.txRate = txRate;
    return this;
  }

  /**
   * Port tx rate, Unit: KB/s;
   * @return txRate
  */
  @ApiModelProperty(value = "Port tx rate, Unit: KB/s;")


  public Long getTxRate() {
    return txRate;
  }

  public void setTxRate(Long txRate) {
    this.txRate = txRate;
  }

  public GatewayWanStatusEntity latency(Integer latency) {
    this.latency = latency;
    return this;
  }

  /**
   * Wan latency, when mode is wan and device is connected, Unit: ms
   * @return latency
  */
  @ApiModelProperty(value = "Wan latency, when mode is wan and device is connected, Unit: ms")


  public Integer getLatency() {
    return latency;
  }

  public void setLatency(Integer latency) {
    this.latency = latency;
  }

  public GatewayWanStatusEntity loss(Double loss) {
    this.loss = loss;
    return this;
  }

  /**
   * Wan packet loss rate, Unit : %
   * @return loss
  */
  @ApiModelProperty(value = "Wan packet loss rate, Unit : %")


  public Double getLoss() {
    return loss;
  }

  public void setLoss(Double loss) {
    this.loss = loss;
  }

  public GatewayWanStatusEntity onlineDetection(Integer onlineDetection) {
    this.onlineDetection = onlineDetection;
    return this;
  }

  /**
   * Wan port online status. 0:offline, 1:online
   * @return onlineDetection
  */
  @ApiModelProperty(value = "Wan port online status. 0:offline, 1:online")


  public Integer getOnlineDetection() {
    return onlineDetection;
  }

  public void setOnlineDetection(Integer onlineDetection) {
    this.onlineDetection = onlineDetection;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GatewayWanStatusEntity gatewayWanStatusEntity = (GatewayWanStatusEntity) o;
    return Objects.equals(this.port, gatewayWanStatusEntity.port) &&
        Objects.equals(this.name, gatewayWanStatusEntity.name) &&
        Objects.equals(this.portDesc, gatewayWanStatusEntity.portDesc) &&
        Objects.equals(this.status, gatewayWanStatusEntity.status) &&
        Objects.equals(this.internetState, gatewayWanStatusEntity.internetState) &&
        Objects.equals(this.wanPortIpv6Config, gatewayWanStatusEntity.wanPortIpv6Config) &&
        Objects.equals(this.wanPortIpv4Config, gatewayWanStatusEntity.wanPortIpv4Config) &&
        Objects.equals(this.rxRate, gatewayWanStatusEntity.rxRate) &&
        Objects.equals(this.txRate, gatewayWanStatusEntity.txRate) &&
        Objects.equals(this.latency, gatewayWanStatusEntity.latency) &&
        Objects.equals(this.loss, gatewayWanStatusEntity.loss) &&
        Objects.equals(this.onlineDetection, gatewayWanStatusEntity.onlineDetection);
  }

  @Override
  public int hashCode() {
    return Objects.hash(port, name, portDesc, status, internetState, wanPortIpv6Config, wanPortIpv4Config, rxRate, txRate, latency, loss, onlineDetection);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GatewayWanStatusEntity {\n");
    
    sb.append("    port: ").append(toIndentedString(port)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    portDesc: ").append(toIndentedString(portDesc)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    internetState: ").append(toIndentedString(internetState)).append("\n");
    sb.append("    wanPortIpv6Config: ").append(toIndentedString(wanPortIpv6Config)).append("\n");
    sb.append("    wanPortIpv4Config: ").append(toIndentedString(wanPortIpv4Config)).append("\n");
    sb.append("    rxRate: ").append(toIndentedString(rxRate)).append("\n");
    sb.append("    txRate: ").append(toIndentedString(txRate)).append("\n");
    sb.append("    latency: ").append(toIndentedString(latency)).append("\n");
    sb.append("    loss: ").append(toIndentedString(loss)).append("\n");
    sb.append("    onlineDetection: ").append(toIndentedString(onlineDetection)).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    ");
  }
}

