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;

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

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

  @JsonProperty("psk")
  private String psk;

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("vlan")
  private Integer vlan;

  public Pskvo 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 Pskvo 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 Pskvo mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * Mac Bound With PSK
   * @return mac
  */
  @ApiModelProperty(value = "Mac Bound With PSK")


  public String getMac() {
    return mac;
  }

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

  public Pskvo 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;
    }
    Pskvo pskvo = (Pskvo) o;
    return Objects.equals(this.name, pskvo.name) &&
        Objects.equals(this.psk, pskvo.psk) &&
        Objects.equals(this.mac, pskvo.mac) &&
        Objects.equals(this.vlan, pskvo.vlan);
  }

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

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

