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

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

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

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

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

  @JsonProperty("type")
  private Integer type;

  @JsonProperty("roleId")
  private String roleId;

  @JsonProperty("name")
  private String name;

  @JsonProperty("email")
  private String email;

  @JsonProperty("mspId")
  private String mspId;

  @JsonProperty("verified")
  private Boolean verified;

  @JsonProperty("alert")
  private Boolean alert;

  @JsonProperty("parentUserId")
  private String parentUserId;

  @JsonProperty("customerRoleId")
  private String customerRoleId;

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

  @JsonProperty("allCustomer")
  private Boolean allCustomer;

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

  /**
   * User ID
   * @return id
  */
  @ApiModelProperty(value = "User ID")


  public String getId() {
    return id;
  }

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

  public MspUserDetailVo type(Integer type) {
    this.type = type;
    return this;
  }

  /**
   * Type of user should be a value as follows: 0:local user; 1: cloud user
   * @return type
  */
  @ApiModelProperty(value = "Type of user should be a value as follows: 0:local user; 1: cloud user")


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }

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

  /**
   * Msp user role ID in MSP
   * @return roleId
  */
  @ApiModelProperty(value = "Msp user role ID in MSP")


  public String getRoleId() {
    return roleId;
  }

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

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

  /**
   * User name
   * @return name
  */
  @ApiModelProperty(value = "User name")


  public String getName() {
    return name;
  }

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

  public MspUserDetailVo email(String email) {
    this.email = email;
    return this;
  }

  /**
   * User email
   * @return email
  */
  @ApiModelProperty(value = "User email")


  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public MspUserDetailVo mspId(String mspId) {
    this.mspId = mspId;
    return this;
  }

  /**
   * MSP ID
   * @return mspId
  */
  @ApiModelProperty(value = "MSP ID")


  public String getMspId() {
    return mspId;
  }

  public void setMspId(String mspId) {
    this.mspId = mspId;
  }

  public MspUserDetailVo verified(Boolean verified) {
    this.verified = verified;
    return this;
  }

  /**
   * Whether this cloud user has verified
   * @return verified
  */
  @ApiModelProperty(value = "Whether this cloud user has verified")


  public Boolean getVerified() {
    return verified;
  }

  public void setVerified(Boolean verified) {
    this.verified = verified;
  }

  public MspUserDetailVo alert(Boolean alert) {
    this.alert = alert;
    return this;
  }

  /**
   * Whether this user want to receive alert emails
   * @return alert
  */
  @ApiModelProperty(value = "Whether this user want to receive alert emails")


  public Boolean getAlert() {
    return alert;
  }

  public void setAlert(Boolean alert) {
    this.alert = alert;
  }

  public MspUserDetailVo parentUserId(String parentUserId) {
    this.parentUserId = parentUserId;
    return this;
  }

  /**
   * User's parent user ID
   * @return parentUserId
  */
  @ApiModelProperty(value = "User's parent user ID")


  public String getParentUserId() {
    return parentUserId;
  }

  public void setParentUserId(String parentUserId) {
    this.parentUserId = parentUserId;
  }

  public MspUserDetailVo customerRoleId(String customerRoleId) {
    this.customerRoleId = customerRoleId;
    return this;
  }

  /**
   * Msp user's customer role ID when visit customer
   * @return customerRoleId
  */
  @ApiModelProperty(value = "Msp user's customer role ID when visit customer")


  public String getCustomerRoleId() {
    return customerRoleId;
  }

  public void setCustomerRoleId(String customerRoleId) {
    this.customerRoleId = customerRoleId;
  }

  public MspUserDetailVo customerIds(List<String> customerIds) {
    this.customerIds = customerIds;
    return this;
  }

  public MspUserDetailVo addCustomerIdsItem(String customerIdsItem) {
    if (this.customerIds == null) {
      this.customerIds = new ArrayList<>();
    }
    this.customerIds.add(customerIdsItem);
    return this;
  }

  /**
   * User customer privilege list
   * @return customerIds
  */
  @ApiModelProperty(value = "User customer privilege list")


  public List<String> getCustomerIds() {
    return customerIds;
  }

  public void setCustomerIds(List<String> customerIds) {
    this.customerIds = customerIds;
  }

  public MspUserDetailVo allCustomer(Boolean allCustomer) {
    this.allCustomer = allCustomer;
    return this;
  }

  /**
   * Whether msp user has all customer permission, including new created customer
   * @return allCustomer
  */
  @ApiModelProperty(value = "Whether msp user has all customer permission, including new created customer")


  public Boolean getAllCustomer() {
    return allCustomer;
  }

  public void setAllCustomer(Boolean allCustomer) {
    this.allCustomer = allCustomer;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    MspUserDetailVo mspUserDetailVo = (MspUserDetailVo) o;
    return Objects.equals(this.id, mspUserDetailVo.id) &&
        Objects.equals(this.type, mspUserDetailVo.type) &&
        Objects.equals(this.roleId, mspUserDetailVo.roleId) &&
        Objects.equals(this.name, mspUserDetailVo.name) &&
        Objects.equals(this.email, mspUserDetailVo.email) &&
        Objects.equals(this.mspId, mspUserDetailVo.mspId) &&
        Objects.equals(this.verified, mspUserDetailVo.verified) &&
        Objects.equals(this.alert, mspUserDetailVo.alert) &&
        Objects.equals(this.parentUserId, mspUserDetailVo.parentUserId) &&
        Objects.equals(this.customerRoleId, mspUserDetailVo.customerRoleId) &&
        Objects.equals(this.customerIds, mspUserDetailVo.customerIds) &&
        Objects.equals(this.allCustomer, mspUserDetailVo.allCustomer);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, type, roleId, name, email, mspId, verified, alert, parentUserId, customerRoleId, customerIds, allCustomer);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class MspUserDetailVo {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    roleId: ").append(toIndentedString(roleId)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    mspId: ").append(toIndentedString(mspId)).append("\n");
    sb.append("    verified: ").append(toIndentedString(verified)).append("\n");
    sb.append("    alert: ").append(toIndentedString(alert)).append("\n");
    sb.append("    parentUserId: ").append(toIndentedString(parentUserId)).append("\n");
    sb.append("    customerRoleId: ").append(toIndentedString(customerRoleId)).append("\n");
    sb.append("    customerIds: ").append(toIndentedString(customerIds)).append("\n");
    sb.append("    allCustomer: ").append(toIndentedString(allCustomer)).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    ");
  }
}

