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.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

/**
 * PPSK Profile&#39;s PPSK Setting.
 */
@ApiModel(description = "PPSK Profile's PPSK Setting.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T11:32:19.054+08:00[Asia/Shanghai]")

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

  @JsonProperty("psk")
  private String psk;

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("vlan")
  private Integer vlan;

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

  /**
   * PPSK Name, should contain 1 to 64 characters.
   * @return name
  */
  @ApiModelProperty(required = true, value = "PPSK Name, should contain 1 to 64 characters.")
  @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 PpskSetting psk(String psk) {
    this.psk = psk;
    return this;
  }

  /**
   * Password, should contain 8 to 63 visible ASCII characters.
   * @return psk
  */
  @ApiModelProperty(required = true, value = "Password, should contain 8 to 63 visible ASCII characters.")
  @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 PpskSetting mac(String mac) {
    this.mac = mac;
    return this;
  }

  /**
   * Mac Bound With PSK.The MAC format requires the use of numbers and uppercase letters and connectors, such as AA-BB-CC-00-11-22.
   * @return mac
  */
  @ApiModelProperty(value = "Mac Bound With PSK.The MAC format requires the use of numbers and uppercase letters and connectors, such as AA-BB-CC-00-11-22.")


  public String getMac() {
    return mac;
  }

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

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

  /**
   * Vlan Bound With PSK, should be within the range of 1-4094.
   * @return vlan
  */
  @ApiModelProperty(value = "Vlan Bound With PSK, should be within the range of 1-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;
    }
    PpskSetting ppskSetting = (PpskSetting) o;
    return Objects.equals(this.name, ppskSetting.name) &&
        Objects.equals(this.psk, ppskSetting.psk) &&
        Objects.equals(this.mac, ppskSetting.mac) &&
        Objects.equals(this.vlan, ppskSetting.vlan);
  }

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

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PpskSetting {\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    ");
  }
}

