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;

/**
 * This field is required when Parameter [autoCreatePsks] is false; PPSK List In the PPSK Profile
 */
@ApiModel(description = "This field is required when Parameter [autoCreatePsks] is false; PPSK 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 PpskSettingV2   {
  @JsonProperty("name")
  private String name;

  @JsonProperty("psk")
  private String psk;

  @JsonProperty("mac")
  private String mac;

  @JsonProperty("vlan")
  private Integer vlan;

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

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

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

