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;

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

public class PpskAutoCreateSetting   {
  @JsonProperty("number")
  private Integer number;

  @JsonProperty("prefix")
  private String prefix;

  @JsonProperty("length")
  private Integer length;

  @JsonProperty("vlan")
  private Integer vlan;

  public PpskAutoCreateSetting number(Integer number) {
    this.number = number;
    return this;
  }

  /**
   * Generate Number, should be within the range of 1-1024.
   * @return number
  */
  @ApiModelProperty(required = true, value = "Generate Number, should be within the range of 1-1024.")
  @NotNull


  public Integer getNumber() {
    return number;
  }

  public void setNumber(Integer number) {
    this.number = number;
  }

  public PpskAutoCreateSetting prefix(String prefix) {
    this.prefix = prefix;
    return this;
  }

  /**
   * PSK Name Prefix, should contain 1 to 60 visible ASCII characters.
   * @return prefix
  */
  @ApiModelProperty(required = true, value = "PSK Name Prefix, should contain 1 to 60 visible ASCII characters.")
  @NotNull

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

  public void setPrefix(String prefix) {
    this.prefix = prefix;
  }

  public PpskAutoCreateSetting length(Integer length) {
    this.length = length;
    return this;
  }

  /**
   * PSK Password Length, should be within the range of 8-63.
   * @return length
  */
  @ApiModelProperty(required = true, value = "PSK Password Length, should be within the range of 8-63.")
  @NotNull


  public Integer getLength() {
    return length;
  }

  public void setLength(Integer length) {
    this.length = length;
  }

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

  /**
   * PSK Bound Vlan, should be within the range of 1-4094.
   * @return vlan
  */
  @ApiModelProperty(value = "PSK Bound Vlan, 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;
    }
    PpskAutoCreateSetting ppskAutoCreateSetting = (PpskAutoCreateSetting) o;
    return Objects.equals(this.number, ppskAutoCreateSetting.number) &&
        Objects.equals(this.prefix, ppskAutoCreateSetting.prefix) &&
        Objects.equals(this.length, ppskAutoCreateSetting.length) &&
        Objects.equals(this.vlan, ppskAutoCreateSetting.vlan);
  }

  @Override
  public int hashCode() {
    return Objects.hash(number, prefix, length, vlan);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PpskAutoCreateSetting {\n");
    
    sb.append("    number: ").append(toIndentedString(number)).append("\n");
    sb.append("    prefix: ").append(toIndentedString(prefix)).append("\n");
    sb.append("    length: ").append(toIndentedString(length)).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    ");
  }
}

