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

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

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

/**
 * Auto Created PSKs.
 */
@ApiModel(description = "Auto Created PSKs.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

public class Psk   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("psk")
  private String psk;

  @JsonProperty("vlan")
  private Integer vlan;

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

  /**
   * PSK Name
   * @return name
  */
  @ApiModelProperty(required = true, value = "PSK Name")
  @NotNull

@Pattern(regexp="^[a-zA-z0-9'!\"#$%&()*,./:;?^_`\\[\\]{|}~<>\\ ][\\041-\\0176]{0,63}$") 
  public String getName() {
    return name;
  }

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

  public Psk psk(String psk) {
    this.psk = psk;
    return this;
  }

  /**
   * Password
   * @return psk
  */
  @ApiModelProperty(required = true, value = "Password")
  @NotNull

@Pattern(regexp="^([A-Za-z0-9\\p{Punct} ]{8,63}|[0-9a-fA-F]{8,63})$") 
  public String getPsk() {
    return psk;
  }

  public void setPsk(String psk) {
    this.psk = psk;
  }

  public Psk vlan(Integer vlan) {
    this.vlan = vlan;
    return this;
  }

  /**
   * Vlan Bound With PSK
   * minimum: 1
   * maximum: 4094
   * @return vlan
  */
  @ApiModelProperty(value = "Vlan Bound With PSK")

@Min(1) @Max(4094) 
  public Integer getVlan() {
    return vlan;
  }

  public void setVlan(Integer vlan) {
    this.vlan = vlan;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Psk psk = (Psk) o;
    return Objects.equals(this.name, psk.name) &&
        Objects.equals(this.psk, psk.psk) &&
        Objects.equals(this.vlan, psk.vlan);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, psk, vlan);
  }

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

