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;

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

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

  @JsonProperty("showModel")
  private String showModel;

  @JsonProperty("firmwareVersion")
  private String firmwareVersion;

  @JsonProperty("ip")
  private String ip;

  @JsonProperty("uptime")
  private String uptime;

  @JsonProperty("temp")
  private Integer temp;

  @JsonProperty("cpuUtil")
  private Integer cpuUtil;

  @JsonProperty("memUtil")
  private Integer memUtil;

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

  @JsonProperty("lastSeen")
  private Long lastSeen;

  @JsonProperty("portConfigs")
  @Valid
  private List<GatewayPortConfig> portConfigs = null;

  @JsonProperty("multiChipGateway")
  private Boolean multiChipGateway;

  @JsonProperty("multiChipInfos")
  @Valid
  private List<List<Integer>> multiChipInfos = null;

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

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


  public String getMac() {
    return mac;
  }

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

  public GatewayInfo showModel(String showModel) {
    this.showModel = showModel;
    return this;
  }

  /**
   * Gateway model description
   * @return showModel
  */
  @ApiModelProperty(value = "Gateway model description")


  public String getShowModel() {
    return showModel;
  }

  public void setShowModel(String showModel) {
    this.showModel = showModel;
  }

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

  /**
   * Gateway software version
   * @return firmwareVersion
  */
  @ApiModelProperty(value = "Gateway software version")


  public String getFirmwareVersion() {
    return firmwareVersion;
  }

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

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

  /**
   * Gateway IPv4
   * @return ip
  */
  @ApiModelProperty(value = "Gateway IPv4")


  public String getIp() {
    return ip;
  }

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

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

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


  public String getUptime() {
    return uptime;
  }

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

  public GatewayInfo temp(Integer temp) {
    this.temp = temp;
    return this;
  }

  /**
   * Gateway temperature
   * @return temp
  */
  @ApiModelProperty(value = "Gateway temperature")


  public Integer getTemp() {
    return temp;
  }

  public void setTemp(Integer temp) {
    this.temp = temp;
  }

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

  /**
   * Gateway cpu utilization rate
   * @return cpuUtil
  */
  @ApiModelProperty(value = "Gateway cpu utilization rate")


  public Integer getCpuUtil() {
    return cpuUtil;
  }

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

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

  /**
   * Gateway memory utilization rate
   * @return memUtil
  */
  @ApiModelProperty(value = "Gateway memory utilization rate")


  public Integer getMemUtil() {
    return memUtil;
  }

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

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

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

  /**
   * IPv6 address List
   * @return ipv6List
  */
  @ApiModelProperty(value = "IPv6 address List")


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

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

  public GatewayInfo lastSeen(Long lastSeen) {
    this.lastSeen = lastSeen;
    return this;
  }

  /**
   * Last seen time
   * @return lastSeen
  */
  @ApiModelProperty(value = "Last seen time")


  public Long getLastSeen() {
    return lastSeen;
  }

  public void setLastSeen(Long lastSeen) {
    this.lastSeen = lastSeen;
  }

  public GatewayInfo portConfigs(List<GatewayPortConfig> portConfigs) {
    this.portConfigs = portConfigs;
    return this;
  }

  public GatewayInfo addPortConfigsItem(GatewayPortConfig portConfigsItem) {
    if (this.portConfigs == null) {
      this.portConfigs = new ArrayList<>();
    }
    this.portConfigs.add(portConfigsItem);
    return this;
  }

  /**
   * Gateway port configs
   * @return portConfigs
  */
  @ApiModelProperty(value = "Gateway port configs")

  @Valid

  public List<GatewayPortConfig> getPortConfigs() {
    return portConfigs;
  }

  public void setPortConfigs(List<GatewayPortConfig> portConfigs) {
    this.portConfigs = portConfigs;
  }

  public GatewayInfo multiChipGateway(Boolean multiChipGateway) {
    this.multiChipGateway = multiChipGateway;
    return this;
  }

  /**
   * Whether this gateway is a multi-chip gateway
   * @return multiChipGateway
  */
  @ApiModelProperty(value = "Whether this gateway is a multi-chip gateway")


  public Boolean getMultiChipGateway() {
    return multiChipGateway;
  }

  public void setMultiChipGateway(Boolean multiChipGateway) {
    this.multiChipGateway = multiChipGateway;
  }

  public GatewayInfo multiChipInfos(List<List<Integer>> multiChipInfos) {
    this.multiChipInfos = multiChipInfos;
    return this;
  }

  public GatewayInfo addMultiChipInfosItem(List<Integer> multiChipInfosItem) {
    if (this.multiChipInfos == null) {
      this.multiChipInfos = new ArrayList<>();
    }
    this.multiChipInfos.add(multiChipInfosItem);
    return this;
  }

  /**
   * Only ports within the same group can be mirrored
   * @return multiChipInfos
  */
  @ApiModelProperty(value = "Only ports within the same group can be mirrored")

  @Valid

  public List<List<Integer>> getMultiChipInfos() {
    return multiChipInfos;
  }

  public void setMultiChipInfos(List<List<Integer>> multiChipInfos) {
    this.multiChipInfos = multiChipInfos;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    GatewayInfo gatewayInfo = (GatewayInfo) o;
    return Objects.equals(this.mac, gatewayInfo.mac) &&
        Objects.equals(this.showModel, gatewayInfo.showModel) &&
        Objects.equals(this.firmwareVersion, gatewayInfo.firmwareVersion) &&
        Objects.equals(this.ip, gatewayInfo.ip) &&
        Objects.equals(this.uptime, gatewayInfo.uptime) &&
        Objects.equals(this.temp, gatewayInfo.temp) &&
        Objects.equals(this.cpuUtil, gatewayInfo.cpuUtil) &&
        Objects.equals(this.memUtil, gatewayInfo.memUtil) &&
        Objects.equals(this.ipv6List, gatewayInfo.ipv6List) &&
        Objects.equals(this.lastSeen, gatewayInfo.lastSeen) &&
        Objects.equals(this.portConfigs, gatewayInfo.portConfigs) &&
        Objects.equals(this.multiChipGateway, gatewayInfo.multiChipGateway) &&
        Objects.equals(this.multiChipInfos, gatewayInfo.multiChipInfos);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mac, showModel, firmwareVersion, ip, uptime, temp, cpuUtil, memUtil, ipv6List, lastSeen, portConfigs, multiChipGateway, multiChipInfos);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class GatewayInfo {\n");
    
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    showModel: ").append(toIndentedString(showModel)).append("\n");
    sb.append("    firmwareVersion: ").append(toIndentedString(firmwareVersion)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    uptime: ").append(toIndentedString(uptime)).append("\n");
    sb.append("    temp: ").append(toIndentedString(temp)).append("\n");
    sb.append("    cpuUtil: ").append(toIndentedString(cpuUtil)).append("\n");
    sb.append("    memUtil: ").append(toIndentedString(memUtil)).append("\n");
    sb.append("    ipv6List: ").append(toIndentedString(ipv6List)).append("\n");
    sb.append("    lastSeen: ").append(toIndentedString(lastSeen)).append("\n");
    sb.append("    portConfigs: ").append(toIndentedString(portConfigs)).append("\n");
    sb.append("    multiChipGateway: ").append(toIndentedString(multiChipGateway)).append("\n");
    sb.append("    multiChipInfos: ").append(toIndentedString(multiChipInfos)).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    ");
  }
}

