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

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

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

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

public class SslVpnUserGroupEntity   {
  @JsonProperty("id")
  private String id;

  @JsonProperty("name")
  private String name;

  @JsonProperty("radiusAttribute")
  private String radiusAttribute;

  @JsonProperty("LDAPAttribute")
  private String ldAPAttribute;

  @JsonProperty("resourceGroupList")
  @Valid
  private List<SslVpnResourceGroupBriefInfo> resourceGroupList = null;

  @JsonProperty("userList")
  @Valid
  private List<String> userList = null;

  @JsonProperty("userNumber")
  private Integer userNumber;

  public SslVpnUserGroupEntity id(String id) {
    this.id = id;
    return this;
  }

  /**
   * ID of the SSL VPN user group
   * @return id
  */
  @ApiModelProperty(value = "ID of the SSL VPN user group")


  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

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

  /**
   * Name of the SSL VPN user group
   * @return name
  */
  @ApiModelProperty(required = true, value = "Name of the SSL VPN user group")
  @NotNull


  public String getName() {
    return name;
  }

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

  public SslVpnUserGroupEntity radiusAttribute(String radiusAttribute) {
    this.radiusAttribute = radiusAttribute;
    return this;
  }

  /**
   * Attribute value used for radius authentication
   * @return radiusAttribute
  */
  @ApiModelProperty(value = "Attribute value used for radius authentication")


  public String getRadiusAttribute() {
    return radiusAttribute;
  }

  public void setRadiusAttribute(String radiusAttribute) {
    this.radiusAttribute = radiusAttribute;
  }

  public SslVpnUserGroupEntity ldAPAttribute(String ldAPAttribute) {
    this.ldAPAttribute = ldAPAttribute;
    return this;
  }

  /**
   * Attribute value used for LDAP authentication
   * @return ldAPAttribute
  */
  @ApiModelProperty(value = "Attribute value used for LDAP authentication")


  public String getLdAPAttribute() {
    return ldAPAttribute;
  }

  public void setLdAPAttribute(String ldAPAttribute) {
    this.ldAPAttribute = ldAPAttribute;
  }

  public SslVpnUserGroupEntity resourceGroupList(List<SslVpnResourceGroupBriefInfo> resourceGroupList) {
    this.resourceGroupList = resourceGroupList;
    return this;
  }

  public SslVpnUserGroupEntity addResourceGroupListItem(SslVpnResourceGroupBriefInfo resourceGroupListItem) {
    if (this.resourceGroupList == null) {
      this.resourceGroupList = new ArrayList<>();
    }
    this.resourceGroupList.add(resourceGroupListItem);
    return this;
  }

  /**
   * Resource group list of the SSL VPN user group
   * @return resourceGroupList
  */
  @ApiModelProperty(value = "Resource group list of the SSL VPN user group")

  @Valid

  public List<SslVpnResourceGroupBriefInfo> getResourceGroupList() {
    return resourceGroupList;
  }

  public void setResourceGroupList(List<SslVpnResourceGroupBriefInfo> resourceGroupList) {
    this.resourceGroupList = resourceGroupList;
  }

  public SslVpnUserGroupEntity userList(List<String> userList) {
    this.userList = userList;
    return this;
  }

  public SslVpnUserGroupEntity addUserListItem(String userListItem) {
    if (this.userList == null) {
      this.userList = new ArrayList<>();
    }
    this.userList.add(userListItem);
    return this;
  }

  /**
   * User list of the SSL VPN user group
   * @return userList
  */
  @ApiModelProperty(value = "User list of the SSL VPN user group")


  public List<String> getUserList() {
    return userList;
  }

  public void setUserList(List<String> userList) {
    this.userList = userList;
  }

  public SslVpnUserGroupEntity userNumber(Integer userNumber) {
    this.userNumber = userNumber;
    return this;
  }

  /**
   * User number of the SSL VPN user group
   * @return userNumber
  */
  @ApiModelProperty(value = "User number of the SSL VPN user group")


  public Integer getUserNumber() {
    return userNumber;
  }

  public void setUserNumber(Integer userNumber) {
    this.userNumber = userNumber;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SslVpnUserGroupEntity sslVpnUserGroupEntity = (SslVpnUserGroupEntity) o;
    return Objects.equals(this.id, sslVpnUserGroupEntity.id) &&
        Objects.equals(this.name, sslVpnUserGroupEntity.name) &&
        Objects.equals(this.radiusAttribute, sslVpnUserGroupEntity.radiusAttribute) &&
        Objects.equals(this.ldAPAttribute, sslVpnUserGroupEntity.ldAPAttribute) &&
        Objects.equals(this.resourceGroupList, sslVpnUserGroupEntity.resourceGroupList) &&
        Objects.equals(this.userList, sslVpnUserGroupEntity.userList) &&
        Objects.equals(this.userNumber, sslVpnUserGroupEntity.userNumber);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, radiusAttribute, ldAPAttribute, resourceGroupList, userList, userNumber);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SslVpnUserGroupEntity {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    radiusAttribute: ").append(toIndentedString(radiusAttribute)).append("\n");
    sb.append("    ldAPAttribute: ").append(toIndentedString(ldAPAttribute)).append("\n");
    sb.append("    resourceGroupList: ").append(toIndentedString(resourceGroupList)).append("\n");
    sb.append("    userList: ").append(toIndentedString(userList)).append("\n");
    sb.append("    userNumber: ").append(toIndentedString(userNumber)).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    ");
  }
}

