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

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

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

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

public class AddDeviceWithSiteBySnOpenApiVo   {
  @JsonProperty("siteId")
  private String siteId;

  @JsonProperty("sn")
  private String sn;

  @JsonProperty("name")
  private String name;

  @JsonProperty("username")
  private String username;

  @JsonProperty("password")
  private String password;

  public AddDeviceWithSiteBySnOpenApiVo siteId(String siteId) {
    this.siteId = siteId;
    return this;
  }

  /**
   * Site ID
   * @return siteId
  */
  @ApiModelProperty(value = "Site ID")


  public String getSiteId() {
    return siteId;
  }

  public void setSiteId(String siteId) {
    this.siteId = siteId;
  }

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

  /**
   * Device serial number. It should contains 13 characters.
   * @return sn
  */
  @ApiModelProperty(value = "Device serial number. It should contains 13 characters.")

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

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

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

  /**
   * Device name should contain 1 to 128 characters.
   * @return name
  */
  @ApiModelProperty(value = "Device name should contain 1 to 128 characters.")

@Pattern(regexp="^[^ \\+\\-\\@\\=]$|^[^ \\+\\-\\@\\=].{0,126}[^ ]$") 
  public String getName() {
    return name;
  }

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

  public AddDeviceWithSiteBySnOpenApiVo username(String username) {
    this.username = username;
    return this;
  }

  /**
   * Device username. It should contain 1 to 128 characters.
   * @return username
  */
  @ApiModelProperty(value = "Device username. It should contain 1 to 128 characters.")


  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public AddDeviceWithSiteBySnOpenApiVo password(String password) {
    this.password = password;
    return this;
  }

  /**
   * Device password. It should contain 1 to 128 characters.
   * @return password
  */
  @ApiModelProperty(value = "Device password. It should contain 1 to 128 characters.")


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AddDeviceWithSiteBySnOpenApiVo addDeviceWithSiteBySnOpenApiVo = (AddDeviceWithSiteBySnOpenApiVo) o;
    return Objects.equals(this.siteId, addDeviceWithSiteBySnOpenApiVo.siteId) &&
        Objects.equals(this.sn, addDeviceWithSiteBySnOpenApiVo.sn) &&
        Objects.equals(this.name, addDeviceWithSiteBySnOpenApiVo.name) &&
        Objects.equals(this.username, addDeviceWithSiteBySnOpenApiVo.username) &&
        Objects.equals(this.password, addDeviceWithSiteBySnOpenApiVo.password);
  }

  @Override
  public int hashCode() {
    return Objects.hash(siteId, sn, name, username, password);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AddDeviceWithSiteBySnOpenApiVo {\n");
    
    sb.append("    siteId: ").append(toIndentedString(siteId)).append("\n");
    sb.append("    sn: ").append(toIndentedString(sn)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    username: ").append(toIndentedString(username)).append("\n");
    sb.append("    password: ").append(toIndentedString(password)).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    ");
  }
}

