package org.wfc.omada.api.sitesetting.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Objects;

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

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

  @JsonProperty("status")
  private Boolean status;

  @JsonProperty("bindType")
  private Integer bindType;

  @JsonProperty("server")
  private String server;

  @JsonProperty("dstPort")
  private Integer dstPort;

  @JsonProperty("useSsl")
  private Boolean useSsl;

  @JsonProperty("cn")
  private String cn;

  @JsonProperty("baseDn")
  private String baseDn;

  @JsonProperty("groupDn")
  private String groupDn;

  @JsonProperty("filter")
  private String filter;

  @JsonProperty("regularDn")
  private String regularDn;

  @JsonProperty("regularPassword")
  private String regularPassword;

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

  /**
   * LDAP profile name. Name should contain 1 to 64 characters
   * @return name
  */
  @ApiModelProperty(required = true, value = "LDAP profile name. Name should contain 1 to 64 characters")
  @NotNull

@Pattern(regexp="^[^ ]$|^[^ ].{0,62}[^ ]$") 
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public CreateLdapProfileOpenApiVo status(Boolean status) {
    this.status = status;
    return this;
  }

  /**
   * LDAP profile enable status
   * @return status
  */
  @ApiModelProperty(required = true, value = "LDAP profile enable status")
  @NotNull


  public Boolean getStatus() {
    return status;
  }

  public void setStatus(Boolean status) {
    this.status = status;
  }

  public CreateLdapProfileOpenApiVo bindType(Integer bindType) {
    this.bindType = bindType;
    return this;
  }

  /**
   * Type of LDAP bind. BindType should be a value as follows: 0: Simple Mode; 1: Anonymous Mode; 2: Regular Mode
   * @return bindType
  */
  @ApiModelProperty(required = true, value = "Type of LDAP bind. BindType should be a value as follows: 0: Simple Mode; 1: Anonymous Mode; 2: Regular Mode")
  @NotNull


  public Integer getBindType() {
    return bindType;
  }

  public void setBindType(Integer bindType) {
    this.bindType = bindType;
  }

  public CreateLdapProfileOpenApiVo server(String server) {
    this.server = server;
    return this;
  }

  /**
   * LDAP server address
   * @return server
  */
  @ApiModelProperty(required = true, value = "LDAP server address")
  @NotNull


  public String getServer() {
    return server;
  }

  public void setServer(String server) {
    this.server = server;
  }

  public CreateLdapProfileOpenApiVo dstPort(Integer dstPort) {
    this.dstPort = dstPort;
    return this;
  }

  /**
   * LDAP server listening port. dstPort should be within the range of 0-65535. When SSL is not enabled, it is generally 389, and when SSL is enabled, it is generally 636
   * @return dstPort
  */
  @ApiModelProperty(required = true, value = "LDAP server listening port. dstPort should be within the range of 0-65535. When SSL is not enabled, it is generally 389, and when SSL is enabled, it is generally 636")
  @NotNull


  public Integer getDstPort() {
    return dstPort;
  }

  public void setDstPort(Integer dstPort) {
    this.dstPort = dstPort;
  }

  public CreateLdapProfileOpenApiVo useSsl(Boolean useSsl) {
    this.useSsl = useSsl;
    return this;
  }

  /**
   * LDAP server enable ssl status
   * @return useSsl
  */
  @ApiModelProperty(required = true, value = "LDAP server enable ssl status")
  @NotNull


  public Boolean getUseSsl() {
    return useSsl;
  }

  public void setUseSsl(Boolean useSsl) {
    this.useSsl = useSsl;
  }

  public CreateLdapProfileOpenApiVo cn(String cn) {
    this.cn = cn;
    return this;
  }

  /**
   * LDAP server common name, for example: cn, uid. Cn should contain 1 to 64 characters
   * @return cn
  */
  @ApiModelProperty(required = true, value = "LDAP server common name, for example: cn, uid. Cn should contain 1 to 64 characters")
  @NotNull


  public String getCn() {
    return cn;
  }

  public void setCn(String cn) {
    this.cn = cn;
  }

  public CreateLdapProfileOpenApiVo baseDn(String baseDn) {
    this.baseDn = baseDn;
    return this;
  }

  /**
   * LDAP server base distinguish name, for example: dc=xxx,dc=com. BaseDn should contain 1 to 200 characters.
   * @return baseDn
  */
  @ApiModelProperty(required = true, value = "LDAP server base distinguish name, for example: dc=xxx,dc=com. BaseDn should contain 1 to 200 characters.")
  @NotNull


  public String getBaseDn() {
    return baseDn;
  }

  public void setBaseDn(String baseDn) {
    this.baseDn = baseDn;
  }

  public CreateLdapProfileOpenApiVo groupDn(String groupDn) {
    this.groupDn = groupDn;
    return this;
  }

  /**
   * LDAP server group distinguish name, optional when parameter [type] is 1 or 2. For example: ou=xxx,dc=xxx,dc=com. GroupDn should contain 1 to 200 characters
   * @return groupDn
  */
  @ApiModelProperty(value = "LDAP server group distinguish name, optional when parameter [type] is 1 or 2. For example: ou=xxx,dc=xxx,dc=com. GroupDn should contain 1 to 200 characters")


  public String getGroupDn() {
    return groupDn;
  }

  public void setGroupDn(String groupDn) {
    this.groupDn = groupDn;
  }

  public CreateLdapProfileOpenApiVo filter(String filter) {
    this.filter = filter;
    return this;
  }

  /**
   * Additional filter, optional when parameter [type] is 1 or 2. For example: ou=xxx. Filter should contain 1 to 64 characters
   * @return filter
  */
  @ApiModelProperty(value = "Additional filter, optional when parameter [type] is 1 or 2. For example: ou=xxx. Filter should contain 1 to 64 characters")


  public String getFilter() {
    return filter;
  }

  public void setFilter(String filter) {
    this.filter = filter;
  }

  public CreateLdapProfileOpenApiVo regularDn(String regularDn) {
    this.regularDn = regularDn;
    return this;
  }

  /**
   * Regular Dn, required when parameter [type] is 2. RegularDn should contain 1 to 64 characters
   * @return regularDn
  */
  @ApiModelProperty(value = "Regular Dn, required when parameter [type] is 2. RegularDn should contain 1 to 64 characters")


  public String getRegularDn() {
    return regularDn;
  }

  public void setRegularDn(String regularDn) {
    this.regularDn = regularDn;
  }

  public CreateLdapProfileOpenApiVo regularPassword(String regularPassword) {
    this.regularPassword = regularPassword;
    return this;
  }

  /**
   * Regular Password, required when parameter [type] is 2. RegularPassword should contain 6 to 32 characters
   * @return regularPassword
  */
  @ApiModelProperty(value = "Regular Password, required when parameter [type] is 2. RegularPassword should contain 6 to 32 characters")


  public String getRegularPassword() {
    return regularPassword;
  }

  public void setRegularPassword(String regularPassword) {
    this.regularPassword = regularPassword;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateLdapProfileOpenApiVo createLdapProfileOpenApiVo = (CreateLdapProfileOpenApiVo) o;
    return Objects.equals(this.name, createLdapProfileOpenApiVo.name) &&
        Objects.equals(this.status, createLdapProfileOpenApiVo.status) &&
        Objects.equals(this.bindType, createLdapProfileOpenApiVo.bindType) &&
        Objects.equals(this.server, createLdapProfileOpenApiVo.server) &&
        Objects.equals(this.dstPort, createLdapProfileOpenApiVo.dstPort) &&
        Objects.equals(this.useSsl, createLdapProfileOpenApiVo.useSsl) &&
        Objects.equals(this.cn, createLdapProfileOpenApiVo.cn) &&
        Objects.equals(this.baseDn, createLdapProfileOpenApiVo.baseDn) &&
        Objects.equals(this.groupDn, createLdapProfileOpenApiVo.groupDn) &&
        Objects.equals(this.filter, createLdapProfileOpenApiVo.filter) &&
        Objects.equals(this.regularDn, createLdapProfileOpenApiVo.regularDn) &&
        Objects.equals(this.regularPassword, createLdapProfileOpenApiVo.regularPassword);
  }

  @Override
  public int hashCode() {
    return Objects.hash(name, status, bindType, server, dstPort, useSsl, cn, baseDn, groupDn, filter, regularDn, regularPassword);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateLdapProfileOpenApiVo {\n");
    
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    bindType: ").append(toIndentedString(bindType)).append("\n");
    sb.append("    server: ").append(toIndentedString(server)).append("\n");
    sb.append("    dstPort: ").append(toIndentedString(dstPort)).append("\n");
    sb.append("    useSsl: ").append(toIndentedString(useSsl)).append("\n");
    sb.append("    cn: ").append(toIndentedString(cn)).append("\n");
    sb.append("    baseDn: ").append(toIndentedString(baseDn)).append("\n");
    sb.append("    groupDn: ").append(toIndentedString(groupDn)).append("\n");
    sb.append("    filter: ").append(toIndentedString(filter)).append("\n");
    sb.append("    regularDn: ").append(toIndentedString(regularDn)).append("\n");
    sb.append("    regularPassword: ").append(toIndentedString(regularPassword)).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    ");
  }
}

