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;

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

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("type")
  private String type;

  @JsonProperty("subtype")
  private String subtype;

  @JsonProperty("deviceSeriesType")
  private Integer deviceSeriesType;

  @JsonProperty("model")
  private String model;

  @JsonProperty("ip")
  private String ip;

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

  @JsonProperty("uptime")
  private String uptime;

  @JsonProperty("status")
  private Integer status;

  @JsonProperty("lastSeen")
  private Long lastSeen;

  @JsonProperty("cpuUtil")
  private Integer cpuUtil;

  @JsonProperty("memUtil")
  private Integer memUtil;

  @JsonProperty("sn")
  private String sn;

  @JsonProperty("licenseStatus")
  private Integer licenseStatus;

  @JsonProperty("tagName")
  private String tagName;

  @JsonProperty("uplinkDeviceMac")
  private String uplinkDeviceMac;

  @JsonProperty("uplinkDeviceName")
  private String uplinkDeviceName;

  @JsonProperty("uplinkDevicePort")
  private String uplinkDevicePort;

  @JsonProperty("linkSpeed")
  private Integer linkSpeed;

  @JsonProperty("duplex")
  private Integer duplex;

  @JsonProperty("switchConsistent")
  private Boolean switchConsistent;

  @JsonProperty("publicIp")
  private String publicIp;

  @JsonProperty("firmwareVersion")
  private String firmwareVersion;

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

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


  public String getMac() {
    return mac;
  }

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

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

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


  public String getName() {
    return name;
  }

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

  public DeviceInfo type(String type) {
    this.type = type;
    return this;
  }

  /**
   * Device type
   * @return type
  */
  @ApiModelProperty(value = "Device type")


  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public DeviceInfo subtype(String subtype) {
    this.subtype = subtype;
    return this;
  }

  /**
   * Switch subtype should be a value as follows: smart: Smart Switch; es: Easy Managed Switch.
   * @return subtype
  */
  @ApiModelProperty(value = "Switch subtype should be a value as follows: smart: Smart Switch; es: Easy Managed Switch.")


  public String getSubtype() {
    return subtype;
  }

  public void setSubtype(String subtype) {
    this.subtype = subtype;
  }

  public DeviceInfo deviceSeriesType(Integer deviceSeriesType) {
    this.deviceSeriesType = deviceSeriesType;
    return this;
  }

  /**
   * Device series type. 0 means basic, 1 means pro.
   * @return deviceSeriesType
  */
  @ApiModelProperty(value = "Device series type. 0 means basic, 1 means pro.")


  public Integer getDeviceSeriesType() {
    return deviceSeriesType;
  }

  public void setDeviceSeriesType(Integer deviceSeriesType) {
    this.deviceSeriesType = deviceSeriesType;
  }

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

  /**
   * Device model name
   * @return model
  */
  @ApiModelProperty(value = "Device model name")


  public String getModel() {
    return model;
  }

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

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

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


  public String getIp() {
    return ip;
  }

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

  public DeviceInfo ipv6(List<String> ipv6) {
    this.ipv6 = ipv6;
    return this;
  }

  public DeviceInfo addIpv6Item(String ipv6Item) {
    if (this.ipv6 == null) {
      this.ipv6 = new ArrayList<>();
    }
    this.ipv6.add(ipv6Item);
    return this;
  }

  /**
   * Device IPv6 list
   * @return ipv6
  */
  @ApiModelProperty(value = "Device IPv6 list")


  public List<String> getIpv6() {
    return ipv6;
  }

  public void setIpv6(List<String> ipv6) {
    this.ipv6 = ipv6;
  }

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

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


  public String getUptime() {
    return uptime;
  }

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

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

  /**
   * Device status should be a value as follows: 0: Disconnected; 1: Connected; 2: Pending; 3: Heartbeat Missed; 4: Isolated
   * @return status
  */
  @ApiModelProperty(value = "Device status should be a value as follows: 0: Disconnected; 1: Connected; 2: Pending; 3: Heartbeat Missed; 4: Isolated")


  public Integer getStatus() {
    return status;
  }

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

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

  /**
   * Device lastSeen
   * @return lastSeen
  */
  @ApiModelProperty(value = "Device lastSeen")


  public Long getLastSeen() {
    return lastSeen;
  }

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

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

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


  public Integer getCpuUtil() {
    return cpuUtil;
  }

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

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

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


  public Integer getMemUtil() {
    return memUtil;
  }

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

  public DeviceInfo sn(String sn) {
    this.sn = sn;
    return this;
  }

  /**
   * Device serial number
   * @return sn
  */
  @ApiModelProperty(value = "Device serial number")


  public String getSn() {
    return sn;
  }

  public void setSn(String sn) {
    this.sn = sn;
  }

  public DeviceInfo licenseStatus(Integer licenseStatus) {
    this.licenseStatus = licenseStatus;
    return this;
  }

  /**
   * Device license status (Only for cloud base) should be a value as follows: 0: unActive; 1: Unbind; 2: Expired; 3: active
   * @return licenseStatus
  */
  @ApiModelProperty(value = "Device license status (Only for cloud base) should be a value as follows: 0: unActive; 1: Unbind; 2: Expired; 3: active")


  public Integer getLicenseStatus() {
    return licenseStatus;
  }

  public void setLicenseStatus(Integer licenseStatus) {
    this.licenseStatus = licenseStatus;
  }

  public DeviceInfo tagName(String tagName) {
    this.tagName = tagName;
    return this;
  }

  /**
   * Device tag name
   * @return tagName
  */
  @ApiModelProperty(value = "Device tag name")


  public String getTagName() {
    return tagName;
  }

  public void setTagName(String tagName) {
    this.tagName = tagName;
  }

  public DeviceInfo uplinkDeviceMac(String uplinkDeviceMac) {
    this.uplinkDeviceMac = uplinkDeviceMac;
    return this;
  }

  /**
   * Uplink device mac
   * @return uplinkDeviceMac
  */
  @ApiModelProperty(value = "Uplink device mac")


  public String getUplinkDeviceMac() {
    return uplinkDeviceMac;
  }

  public void setUplinkDeviceMac(String uplinkDeviceMac) {
    this.uplinkDeviceMac = uplinkDeviceMac;
  }

  public DeviceInfo uplinkDeviceName(String uplinkDeviceName) {
    this.uplinkDeviceName = uplinkDeviceName;
    return this;
  }

  /**
   * Uplink device name
   * @return uplinkDeviceName
  */
  @ApiModelProperty(value = "Uplink device name")


  public String getUplinkDeviceName() {
    return uplinkDeviceName;
  }

  public void setUplinkDeviceName(String uplinkDeviceName) {
    this.uplinkDeviceName = uplinkDeviceName;
  }

  public DeviceInfo uplinkDevicePort(String uplinkDevicePort) {
    this.uplinkDevicePort = uplinkDevicePort;
    return this;
  }

  /**
   * Uplink device port
   * @return uplinkDevicePort
  */
  @ApiModelProperty(value = "Uplink device port")


  public String getUplinkDevicePort() {
    return uplinkDevicePort;
  }

  public void setUplinkDevicePort(String uplinkDevicePort) {
    this.uplinkDevicePort = uplinkDevicePort;
  }

  public DeviceInfo linkSpeed(Integer linkSpeed) {
    this.linkSpeed = linkSpeed;
    return this;
  }

  /**
   * Device uplink port linkSpeed, linkSpeed should be a value as follows: 0: Auto; 1: 10M; 2: 100M; 3: 1000M; 4: 2500M; 5: 10G; 6: 5G; 7: 25G, 8: 100G.
   * @return linkSpeed
  */
  @ApiModelProperty(value = "Device uplink port linkSpeed, linkSpeed should be a value as follows: 0: Auto; 1: 10M; 2: 100M; 3: 1000M; 4: 2500M; 5: 10G; 6: 5G; 7: 25G, 8: 100G.")


  public Integer getLinkSpeed() {
    return linkSpeed;
  }

  public void setLinkSpeed(Integer linkSpeed) {
    this.linkSpeed = linkSpeed;
  }

  public DeviceInfo duplex(Integer duplex) {
    this.duplex = duplex;
    return this;
  }

  /**
   * Device uplink port duplex mode, duplex should be a value as follows: 0: Auto; 1: Half; 2: Full.
   * @return duplex
  */
  @ApiModelProperty(value = "Device uplink port duplex mode, duplex should be a value as follows: 0: Auto; 1: Half; 2: Full.")


  public Integer getDuplex() {
    return duplex;
  }

  public void setDuplex(Integer duplex) {
    this.duplex = duplex;
  }

  public DeviceInfo switchConsistent(Boolean switchConsistent) {
    this.switchConsistent = switchConsistent;
    return this;
  }

  /**
   * Whether the device can be adopted by the site.
   * @return switchConsistent
  */
  @ApiModelProperty(value = "Whether the device can be adopted by the site.")


  public Boolean getSwitchConsistent() {
    return switchConsistent;
  }

  public void setSwitchConsistent(Boolean switchConsistent) {
    this.switchConsistent = switchConsistent;
  }

  public DeviceInfo publicIp(String publicIp) {
    this.publicIp = publicIp;
    return this;
  }

  /**
   * Device public IP
   * @return publicIp
  */
  @ApiModelProperty(value = "Device public IP")


  public String getPublicIp() {
    return publicIp;
  }

  public void setPublicIp(String publicIp) {
    this.publicIp = publicIp;
  }

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

  /**
   * The device firmware version.
   * @return firmwareVersion
  */
  @ApiModelProperty(value = "The device firmware version.")


  public String getFirmwareVersion() {
    return firmwareVersion;
  }

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


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DeviceInfo deviceInfo = (DeviceInfo) o;
    return Objects.equals(this.mac, deviceInfo.mac) &&
        Objects.equals(this.name, deviceInfo.name) &&
        Objects.equals(this.type, deviceInfo.type) &&
        Objects.equals(this.subtype, deviceInfo.subtype) &&
        Objects.equals(this.deviceSeriesType, deviceInfo.deviceSeriesType) &&
        Objects.equals(this.model, deviceInfo.model) &&
        Objects.equals(this.ip, deviceInfo.ip) &&
        Objects.equals(this.ipv6, deviceInfo.ipv6) &&
        Objects.equals(this.uptime, deviceInfo.uptime) &&
        Objects.equals(this.status, deviceInfo.status) &&
        Objects.equals(this.lastSeen, deviceInfo.lastSeen) &&
        Objects.equals(this.cpuUtil, deviceInfo.cpuUtil) &&
        Objects.equals(this.memUtil, deviceInfo.memUtil) &&
        Objects.equals(this.sn, deviceInfo.sn) &&
        Objects.equals(this.licenseStatus, deviceInfo.licenseStatus) &&
        Objects.equals(this.tagName, deviceInfo.tagName) &&
        Objects.equals(this.uplinkDeviceMac, deviceInfo.uplinkDeviceMac) &&
        Objects.equals(this.uplinkDeviceName, deviceInfo.uplinkDeviceName) &&
        Objects.equals(this.uplinkDevicePort, deviceInfo.uplinkDevicePort) &&
        Objects.equals(this.linkSpeed, deviceInfo.linkSpeed) &&
        Objects.equals(this.duplex, deviceInfo.duplex) &&
        Objects.equals(this.switchConsistent, deviceInfo.switchConsistent) &&
        Objects.equals(this.publicIp, deviceInfo.publicIp) &&
        Objects.equals(this.firmwareVersion, deviceInfo.firmwareVersion);
  }

  @Override
  public int hashCode() {
    return Objects.hash(mac, name, type, subtype, deviceSeriesType, model, ip, ipv6, uptime, status, lastSeen, cpuUtil, memUtil, sn, licenseStatus, tagName, uplinkDeviceMac, uplinkDeviceName, uplinkDevicePort, linkSpeed, duplex, switchConsistent, publicIp, firmwareVersion);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DeviceInfo {\n");
    
    sb.append("    mac: ").append(toIndentedString(mac)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    subtype: ").append(toIndentedString(subtype)).append("\n");
    sb.append("    deviceSeriesType: ").append(toIndentedString(deviceSeriesType)).append("\n");
    sb.append("    model: ").append(toIndentedString(model)).append("\n");
    sb.append("    ip: ").append(toIndentedString(ip)).append("\n");
    sb.append("    ipv6: ").append(toIndentedString(ipv6)).append("\n");
    sb.append("    uptime: ").append(toIndentedString(uptime)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    lastSeen: ").append(toIndentedString(lastSeen)).append("\n");
    sb.append("    cpuUtil: ").append(toIndentedString(cpuUtil)).append("\n");
    sb.append("    memUtil: ").append(toIndentedString(memUtil)).append("\n");
    sb.append("    sn: ").append(toIndentedString(sn)).append("\n");
    sb.append("    licenseStatus: ").append(toIndentedString(licenseStatus)).append("\n");
    sb.append("    tagName: ").append(toIndentedString(tagName)).append("\n");
    sb.append("    uplinkDeviceMac: ").append(toIndentedString(uplinkDeviceMac)).append("\n");
    sb.append("    uplinkDeviceName: ").append(toIndentedString(uplinkDeviceName)).append("\n");
    sb.append("    uplinkDevicePort: ").append(toIndentedString(uplinkDevicePort)).append("\n");
    sb.append("    linkSpeed: ").append(toIndentedString(linkSpeed)).append("\n");
    sb.append("    duplex: ").append(toIndentedString(duplex)).append("\n");
    sb.append("    switchConsistent: ").append(toIndentedString(switchConsistent)).append("\n");
    sb.append("    publicIp: ").append(toIndentedString(publicIp)).append("\n");
    sb.append("    firmwareVersion: ").append(toIndentedString(firmwareVersion)).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    ");
  }
}

