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

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

import javax.validation.Valid;
import java.util.Objects;

/**
 * ExternalUserDetailOpenApiVo
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-12-04T10:44:52.771+08:00[Asia/Shanghai]")

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

  @JsonProperty("name")
  private String name;

  @JsonProperty("idpId")
  private String idpId;

  @JsonProperty("idpName")
  private String idpName;

  @JsonProperty("roleId")
  private String roleId;

  @JsonProperty("roleName")
  private String roleName;

  @JsonProperty("privilege")
  private PrivilegeOpenApiVo privilege;

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

  /**
   * External user ID.
   * @return id
  */
  @ApiModelProperty(value = "External user ID.")


  public String getId() {
    return id;
  }

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

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

  /**
   * External user name.
   * @return name
  */
  @ApiModelProperty(value = "External user name.")


  public String getName() {
    return name;
  }

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

  public ExternalUserDetailOpenApiVo idpId(String idpId) {
    this.idpId = idpId;
    return this;
  }

  /**
   * The ID of IdP which is used by this user.
   * @return idpId
  */
  @ApiModelProperty(value = "The ID of IdP which is used by this user.")


  public String getIdpId() {
    return idpId;
  }

  public void setIdpId(String idpId) {
    this.idpId = idpId;
  }

  public ExternalUserDetailOpenApiVo idpName(String idpName) {
    this.idpName = idpName;
    return this;
  }

  /**
   * The name of IdP which is used by this user.
   * @return idpName
  */
  @ApiModelProperty(value = "The name of IdP which is used by this user.")


  public String getIdpName() {
    return idpName;
  }

  public void setIdpName(String idpName) {
    this.idpName = idpName;
  }

  public ExternalUserDetailOpenApiVo roleId(String roleId) {
    this.roleId = roleId;
    return this;
  }

  /**
   * The ID of role which is used by this user.
   * @return roleId
  */
  @ApiModelProperty(value = "The ID of role which is used by this user.")


  public String getRoleId() {
    return roleId;
  }

  public void setRoleId(String roleId) {
    this.roleId = roleId;
  }

  public ExternalUserDetailOpenApiVo roleName(String roleName) {
    this.roleName = roleName;
    return this;
  }

  /**
   * The name of role which is used by this user.
   * @return roleName
  */
  @ApiModelProperty(value = "The name of role which is used by this user.")


  public String getRoleName() {
    return roleName;
  }

  public void setRoleName(String roleName) {
    this.roleName = roleName;
  }

  public ExternalUserDetailOpenApiVo privilege(PrivilegeOpenApiVo privilege) {
    this.privilege = privilege;
    return this;
  }

  /**
   * Get privilege
   * @return privilege
  */
  @ApiModelProperty(value = "")

  @Valid

  public PrivilegeOpenApiVo getPrivilege() {
    return privilege;
  }

  public void setPrivilege(PrivilegeOpenApiVo privilege) {
    this.privilege = privilege;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExternalUserDetailOpenApiVo externalUserDetailOpenApiVo = (ExternalUserDetailOpenApiVo) o;
    return Objects.equals(this.id, externalUserDetailOpenApiVo.id) &&
        Objects.equals(this.name, externalUserDetailOpenApiVo.name) &&
        Objects.equals(this.idpId, externalUserDetailOpenApiVo.idpId) &&
        Objects.equals(this.idpName, externalUserDetailOpenApiVo.idpName) &&
        Objects.equals(this.roleId, externalUserDetailOpenApiVo.roleId) &&
        Objects.equals(this.roleName, externalUserDetailOpenApiVo.roleName) &&
        Objects.equals(this.privilege, externalUserDetailOpenApiVo.privilege);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, name, idpId, idpName, roleId, roleName, privilege);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ExternalUserDetailOpenApiVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    idpId: ").append(toIndentedString(idpId)).append("\n");
    sb.append("    idpName: ").append(toIndentedString(idpName)).append("\n");
    sb.append("    roleId: ").append(toIndentedString(roleId)).append("\n");
    sb.append("    roleName: ").append(toIndentedString(roleName)).append("\n");
    sb.append("    privilege: ").append(toIndentedString(privilege)).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    ");
  }
}

