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

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

import java.util.Objects;

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

public class SnAddResultVo   {
  @JsonProperty("sn")
  private String sn;

  @JsonProperty("deviceKey")
  private String deviceKey;

  @JsonProperty("name")
  private String name;

  @JsonProperty("status")
  private Integer status;

  @JsonProperty("siteName")
  private String siteName;

  @JsonProperty("online")
  private Boolean online;

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

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


  public String getSn() {
    return sn;
  }

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

  public SnAddResultVo deviceKey(String deviceKey) {
    this.deviceKey = deviceKey;
    return this;
  }

  /**
   * Device key(QR code)
   * @return deviceKey
  */
  @ApiModelProperty(value = "Device key(QR code)")


  public String getDeviceKey() {
    return deviceKey;
  }

  public void setDeviceKey(String deviceKey) {
    this.deviceKey = deviceKey;
  }

  public SnAddResultVo 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 SnAddResultVo status(Integer status) {
    this.status = status;
    return this;
  }

  /**
   * Device add status should be a value as follows: 0: success; 1: waiting to do; 2：importing; -51451：Device ID not found; -52201：Device is offline; -52202：Device is already bounded; -52208：Device is offline during processing; -52200：Device not exit; -53100：Invalid SN code; -53101：SN code already exists; -53102：Incorrect local Username/Password; -53103：Device error; -53113: Too many PRECONFIGURED devices in this account. Available licenses are not enough; -53114: This device has been added by another Controller; -53118: Omada Pro devices can only be added on the Omada Pro Controller; -53119: Omada devices can only be added on the Omada Controller; -39045: Failed to add the device due to duplicate SN codes. Please contact our TP-Link Support.
   * @return status
  */
  @ApiModelProperty(value = "Device add status should be a value as follows: 0: success; 1: waiting to do; 2：importing; -51451：Device ID not found; -52201：Device is offline; -52202：Device is already bounded; -52208：Device is offline during processing; -52200：Device not exit; -53100：Invalid SN code; -53101：SN code already exists; -53102：Incorrect local Username/Password; -53103：Device error; -53113: Too many PRECONFIGURED devices in this account. Available licenses are not enough; -53114: This device has been added by another Controller; -53118: Omada Pro devices can only be added on the Omada Pro Controller; -53119: Omada devices can only be added on the Omada Controller; -39045: Failed to add the device due to duplicate SN codes. Please contact our TP-Link Support.")


  public Integer getStatus() {
    return status;
  }

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

  public SnAddResultVo siteName(String siteName) {
    this.siteName = siteName;
    return this;
  }

  /**
   * If device management records exist when adding devices by SN, you need to forget devices in this site. Otherwise this field will have no value.
   * @return siteName
  */
  @ApiModelProperty(value = "If device management records exist when adding devices by SN, you need to forget devices in this site. Otherwise this field will have no value.")


  public String getSiteName() {
    return siteName;
  }

  public void setSiteName(String siteName) {
    this.siteName = siteName;
  }

  public SnAddResultVo online(Boolean online) {
    this.online = online;
    return this;
  }

  /**
   * Device online or offline
   * @return online
  */
  @ApiModelProperty(value = "Device online or offline")


  public Boolean getOnline() {
    return online;
  }

  public void setOnline(Boolean online) {
    this.online = online;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SnAddResultVo snAddResultVo = (SnAddResultVo) o;
    return Objects.equals(this.sn, snAddResultVo.sn) &&
        Objects.equals(this.deviceKey, snAddResultVo.deviceKey) &&
        Objects.equals(this.name, snAddResultVo.name) &&
        Objects.equals(this.status, snAddResultVo.status) &&
        Objects.equals(this.siteName, snAddResultVo.siteName) &&
        Objects.equals(this.online, snAddResultVo.online);
  }

  @Override
  public int hashCode() {
    return Objects.hash(sn, deviceKey, name, status, siteName, online);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SnAddResultVo {\n");
    
    sb.append("    sn: ").append(toIndentedString(sn)).append("\n");
    sb.append("    deviceKey: ").append(toIndentedString(deviceKey)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    siteName: ").append(toIndentedString(siteName)).append("\n");
    sb.append("    online: ").append(toIndentedString(online)).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    ");
  }
}

