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;

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

public class SimplePasswordSetting   {
  @JsonProperty("password")
  private String password;

  public SimplePasswordSetting password(String password) {
    this.password = password;
    return this;
  }

  /**
   * Auth password, should contain 1 to 128 characters.
   * @return password
  */
  @ApiModelProperty(required = true, value = "Auth password, should contain 1 to 128 characters.")
  @NotNull

@Pattern(regexp="^.{1,128}$") 
  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SimplePasswordSetting simplePasswordSetting = (SimplePasswordSetting) o;
    return Objects.equals(this.password, simplePasswordSetting.password);
  }

  @Override
  public int hashCode() {
    return Objects.hash(password);
  }

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

