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

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

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

public class UnbindActiveDeviceSnOpenApiVo   {
  @JsonProperty("oldSn")
  private String oldSn;

  @JsonProperty("newSn")
  private String newSn;

  public UnbindActiveDeviceSnOpenApiVo oldSn(String oldSn) {
    this.oldSn = oldSn;
    return this;
  }

  /**
   * Old serial number. It should contains 13 characters
   * @return oldSn
  */
  @ApiModelProperty(required = true, value = "Old serial number. It should contains 13 characters")
  @NotNull

@Pattern(regexp="^[A-Z0-9]{13}$") 
  public String getOldSn() {
    return oldSn;
  }

  public void setOldSn(String oldSn) {
    this.oldSn = oldSn;
  }

  public UnbindActiveDeviceSnOpenApiVo newSn(String newSn) {
    this.newSn = newSn;
    return this;
  }

  /**
   * New serial number. It should contains 13 characters
   * @return newSn
  */
  @ApiModelProperty(required = true, value = "New serial number. It should contains 13 characters")
  @NotNull

@Pattern(regexp="^[A-Z0-9]{13}$") 
  public String getNewSn() {
    return newSn;
  }

  public void setNewSn(String newSn) {
    this.newSn = newSn;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    UnbindActiveDeviceSnOpenApiVo unbindActiveDeviceSnOpenApiVo = (UnbindActiveDeviceSnOpenApiVo) o;
    return Objects.equals(this.oldSn, unbindActiveDeviceSnOpenApiVo.oldSn) &&
        Objects.equals(this.newSn, unbindActiveDeviceSnOpenApiVo.newSn);
  }

  @Override
  public int hashCode() {
    return Objects.hash(oldSn, newSn);
  }

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

