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

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

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

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

public class IspLoad   {
  @JsonProperty("portId")
  private Integer portId;

  @JsonProperty("portName")
  private String portName;

  @JsonProperty("data")
  @Valid
  private List<IspLoadStat> data = null;

  public IspLoad portId(Integer portId) {
    this.portId = portId;
    return this;
  }

  /**
   * Port ID
   * @return portId
  */
  @ApiModelProperty(value = "Port ID")


  public Integer getPortId() {
    return portId;
  }

  public void setPortId(Integer portId) {
    this.portId = portId;
  }

  public IspLoad portName(String portName) {
    this.portName = portName;
    return this;
  }

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


  public String getPortName() {
    return portName;
  }

  public void setPortName(String portName) {
    this.portName = portName;
  }

  public IspLoad data(List<IspLoadStat> data) {
    this.data = data;
    return this;
  }

  public IspLoad addDataItem(IspLoadStat dataItem) {
    if (this.data == null) {
      this.data = new ArrayList<>();
    }
    this.data.add(dataItem);
    return this;
  }

  /**
   * WAN port data list
   * @return data
  */
  @ApiModelProperty(value = "WAN port data list")

  @Valid

  public List<IspLoadStat> getData() {
    return data;
  }

  public void setData(List<IspLoadStat> data) {
    this.data = data;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    IspLoad ispLoad = (IspLoad) o;
    return Objects.equals(this.portId, ispLoad.portId) &&
        Objects.equals(this.portName, ispLoad.portName) &&
        Objects.equals(this.data, ispLoad.data);
  }

  @Override
  public int hashCode() {
    return Objects.hash(portId, portName, data);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class IspLoad {\n");
    
    sb.append("    portId: ").append(toIndentedString(portId)).append("\n");
    sb.append("    portName: ").append(toIndentedString(portName)).append("\n");
    sb.append("    data: ").append(toIndentedString(data)).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    ");
  }
}

