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

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

public class SwitchOverviewInfo   {
  @JsonProperty("mac")
  private String mac;

  @JsonProperty("ip")
  private String ip;

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

  @JsonProperty("model")
  private String model;

  @JsonProperty("firmwareVersion")
  private String firmwareVersion;

  @JsonProperty("version")
  private String version;

  @JsonProperty("hwVersion")
  private String hwVersion;

  @JsonProperty("cpuUtil")
  private Integer cpuUtil;

  @JsonProperty("memUtil")
  private Integer memUtil;

  @JsonProperty("uptime")
  private String uptime;

  @JsonProperty("portList")
  @Valid
  private List<PortInfo> portList = null;

  public SwitchOverviewInfo mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * Switch MAC address
   * @return mac
  */
  @ApiModelProperty(value = "Switch MAC address")


  public String getMac() {
    return mac;
  }

  public void setMac(String mac) {
    this.mac = mac;
  }

  public SwitchOverviewInfo ip(String ip) {
    this.ip = ip;
    return this;
  }

  /**
   * Switch IP address
   * @return ip
  */
  @ApiModelProperty(value = "Switch IP address")


  public String getIp() {
    return ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public SwitchOverviewInfo ipv6List(List<String> ipv6List) {
    this.ipv6List = ipv6List;
    return this;
  }

  public SwitchOverviewInfo addIpv6ListItem(String ipv6ListItem) {
    if (this.ipv6List == null) {
      this.ipv6List = new ArrayList<>();
    }
    this.ipv6List.add(ipv6ListItem);
    return this;
  }

  /**
   * Switch IPv6 list
   * @return ipv6List
  */
  @ApiModelProperty(value = "Switch IPv6 list")


  public List<String> getIpv6List() {
    return ipv6List;
  }

  public void setIpv6List(List<String> ipv6List) {
    this.ipv6List = ipv6List;
  }

  public SwitchOverviewInfo model(String model) {
    this.model = model;
    return this;
  }

  /**
   * Model
   * @return model
  */
  @ApiModelProperty(value = "Model")


  public String getModel() {
    return model;
  }

  public void setModel(String model) {
    this.model = model;
  }

  public SwitchOverviewInfo firmwareVersion(String firmwareVersion) {
    this.firmwareVersion = firmwareVersion;
    return this;
  }

  /**
   * Firmware Version e.g:2.5.0 Build 20190118 Rel. 64821
   * @return firmwareVersion
  */
  @ApiModelProperty(value = "Firmware Version e.g:2.5.0 Build 20190118 Rel. 64821")


  public String getFirmwareVersion() {
    return firmwareVersion;
  }

  public void setFirmwareVersion(String firmwareVersion) {
    this.firmwareVersion = firmwareVersion;
  }

  public SwitchOverviewInfo version(String version) {
    this.version = version;
    return this;
  }

  /**
   * Firmware Version e.g:2.5.0
   * @return version
  */
  @ApiModelProperty(value = "Firmware Version e.g:2.5.0")


  public String getVersion() {
    return version;
  }

  public void setVersion(String version) {
    this.version = version;
  }

  public SwitchOverviewInfo hwVersion(String hwVersion) {
    this.hwVersion = hwVersion;
    return this;
  }

  /**
   * Hardware Version
   * @return hwVersion
  */
  @ApiModelProperty(value = "Hardware Version")


  public String getHwVersion() {
    return hwVersion;
  }

  public void setHwVersion(String hwVersion) {
    this.hwVersion = hwVersion;
  }

  public SwitchOverviewInfo cpuUtil(Integer cpuUtil) {
    this.cpuUtil = cpuUtil;
    return this;
  }

  /**
   * CpuUtil
   * @return cpuUtil
  */
  @ApiModelProperty(value = "CpuUtil")


  public Integer getCpuUtil() {
    return cpuUtil;
  }

  public void setCpuUtil(Integer cpuUtil) {
    this.cpuUtil = cpuUtil;
  }

  public SwitchOverviewInfo memUtil(Integer memUtil) {
    this.memUtil = memUtil;
    return this;
  }

  /**
   * MemUtil
   * @return memUtil
  */
  @ApiModelProperty(value = "MemUtil")


  public Integer getMemUtil() {
    return memUtil;
  }

  public void setMemUtil(Integer memUtil) {
    this.memUtil = memUtil;
  }

  public SwitchOverviewInfo uptime(String uptime) {
    this.uptime = uptime;
    return this;
  }

  /**
   * Uptime
   * @return uptime
  */
  @ApiModelProperty(value = "Uptime")


  public String getUptime() {
    return uptime;
  }

  public void setUptime(String uptime) {
    this.uptime = uptime;
  }

  public SwitchOverviewInfo portList(List<PortInfo> portList) {
    this.portList = portList;
    return this;
  }

  public SwitchOverviewInfo addPortListItem(PortInfo portListItem) {
    if (this.portList == null) {
      this.portList = new ArrayList<>();
    }
    this.portList.add(portListItem);
    return this;
  }

  /**
   * Port List
   * @return portList
  */
  @ApiModelProperty(value = "Port List")

  @Valid

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

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SwitchOverviewInfo switchOverviewInfo = (SwitchOverviewInfo) o;
    return Objects.equals(this.mac, switchOverviewInfo.mac) &&
        Objects.equals(this.ip, switchOverviewInfo.ip) &&
        Objects.equals(this.ipv6List, switchOverviewInfo.ipv6List) &&
        Objects.equals(this.model, switchOverviewInfo.model) &&
        Objects.equals(this.firmwareVersion, switchOverviewInfo.firmwareVersion) &&
        Objects.equals(this.version, switchOverviewInfo.version) &&
        Objects.equals(this.hwVersion, switchOverviewInfo.hwVersion) &&
        Objects.equals(this.cpuUtil, switchOverviewInfo.cpuUtil) &&
        Objects.equals(this.memUtil, switchOverviewInfo.memUtil) &&
        Objects.equals(this.uptime, switchOverviewInfo.uptime) &&
        Objects.equals(this.portList, switchOverviewInfo.portList);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mac, ip, ipv6List, model, firmwareVersion, version, hwVersion, cpuUtil, memUtil, uptime, portList);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SwitchOverviewInfo {\n");
    
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    ipv6List: ").append(toIndentedString(ipv6List)).append("\n");
    sb.append("    model: ").append(toIndentedString(model)).append("\n");
    sb.append("    firmwareVersion: ").append(toIndentedString(firmwareVersion)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    hwVersion: ").append(toIndentedString(hwVersion)).append("\n");
    sb.append("    cpuUtil: ").append(toIndentedString(cpuUtil)).append("\n");
    sb.append("    memUtil: ").append(toIndentedString(memUtil)).append("\n");
    sb.append("    uptime: ").append(toIndentedString(uptime)).append("\n");
    sb.append("    portList: ").append(toIndentedString(portList)).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    ");
  }
}

