All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.leanix.mtm.api.models.User Maven / Gradle / Ivy

There is a newer version: 1.7.25
Show newest version
package net.leanix.mtm.api.models;

import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import net.leanix.mtm.api.models.Account;
import net.leanix.mtm.api.models.Link;
import net.leanix.mtm.api.models.Permission;






public class User   {
  
  private String id = null;
  private Account account = null;
  private String userName = null;
  private String email = null;
  private String firstName = null;
  private String lastName = null;
  private Date lastLogin = null;
  private String apiKey = null;
  private String feedKey = null;


  public enum RoleEnum {
    SUPERADMIN("SUPERADMIN"),
    SYSTEM("SYSTEM"),
    APICLIENT("APICLIENT"),
    ACCOUNTADMIN("ACCOUNTADMIN"),
    ACCOUNTUSER("ACCOUNTUSER");

    private String value;

    RoleEnum(String value) {
      this.value = value;
    }

    @Override
    @JsonValue
    public String toString() {
      return value;
    }
  }

  private RoleEnum role = null;


  public enum StatusEnum {
    ACTIVE("ACTIVE"),
    ARCHIVED("ARCHIVED");

    private String value;

    StatusEnum(String value) {
      this.value = value;
    }

    @Override
    @JsonValue
    public String toString() {
      return value;
    }
  }

  private StatusEnum status = null;
  private String crmTags = null;
  private String crmLink = null;
  private List links = new ArrayList();
  private List permissions = new ArrayList();
  private String displayName = null;
  private Boolean active = false;

  
  /**
   **/
  public User id(String id) {
    this.id = id;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("id")
  public String getId() {
    return id;
  }
  public void setId(String id) {
    this.id = id;
  }

  
  /**
   **/
  public User account(Account account) {
    this.account = account;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("account")
  public Account getAccount() {
    return account;
  }
  public void setAccount(Account account) {
    this.account = account;
  }

  
  /**
   **/
  public User userName(String userName) {
    this.userName = userName;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("userName")
  public String getUserName() {
    return userName;
  }
  public void setUserName(String userName) {
    this.userName = userName;
  }

  
  /**
   **/
  public User email(String email) {
    this.email = email;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("email")
  public String getEmail() {
    return email;
  }
  public void setEmail(String email) {
    this.email = email;
  }

  
  /**
   **/
  public User firstName(String firstName) {
    this.firstName = firstName;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("firstName")
  public String getFirstName() {
    return firstName;
  }
  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }

  
  /**
   **/
  public User lastName(String lastName) {
    this.lastName = lastName;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("lastName")
  public String getLastName() {
    return lastName;
  }
  public void setLastName(String lastName) {
    this.lastName = lastName;
  }

  
  /**
   **/
  public User lastLogin(Date lastLogin) {
    this.lastLogin = lastLogin;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("lastLogin")
  public Date getLastLogin() {
    return lastLogin;
  }
  public void setLastLogin(Date lastLogin) {
    this.lastLogin = lastLogin;
  }

  
  /**
   **/
  public User apiKey(String apiKey) {
    this.apiKey = apiKey;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("apiKey")
  public String getApiKey() {
    return apiKey;
  }
  public void setApiKey(String apiKey) {
    this.apiKey = apiKey;
  }

  
  /**
   **/
  public User feedKey(String feedKey) {
    this.feedKey = feedKey;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("feedKey")
  public String getFeedKey() {
    return feedKey;
  }
  public void setFeedKey(String feedKey) {
    this.feedKey = feedKey;
  }

  
  /**
   **/
  public User role(RoleEnum role) {
    this.role = role;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("role")
  public RoleEnum getRole() {
    return role;
  }
  public void setRole(RoleEnum role) {
    this.role = role;
  }

  
  /**
   **/
  public User status(StatusEnum status) {
    this.status = status;
    return this;
  }
  
  @ApiModelProperty(example = "null", required = true, value = "")
  @JsonProperty("status")
  public StatusEnum getStatus() {
    return status;
  }
  public void setStatus(StatusEnum status) {
    this.status = status;
  }

  
  /**
   **/
  public User crmTags(String crmTags) {
    this.crmTags = crmTags;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("crmTags")
  public String getCrmTags() {
    return crmTags;
  }
  public void setCrmTags(String crmTags) {
    this.crmTags = crmTags;
  }

  
  /**
   **/
  public User crmLink(String crmLink) {
    this.crmLink = crmLink;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("crmLink")
  public String getCrmLink() {
    return crmLink;
  }
  public void setCrmLink(String crmLink) {
    this.crmLink = crmLink;
  }

  
  /**
   **/
  public User links(List links) {
    this.links = links;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("links")
  public List getLinks() {
    return links;
  }
  public void setLinks(List links) {
    this.links = links;
  }

  
  /**
   **/
  public User permissions(List permissions) {
    this.permissions = permissions;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("permissions")
  public List getPermissions() {
    return permissions;
  }
  public void setPermissions(List permissions) {
    this.permissions = permissions;
  }

  
  /**
   **/
  public User displayName(String displayName) {
    this.displayName = displayName;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("displayName")
  public String getDisplayName() {
    return displayName;
  }
  public void setDisplayName(String displayName) {
    this.displayName = displayName;
  }

  
  /**
   **/
  public User active(Boolean active) {
    this.active = active;
    return this;
  }
  
  @ApiModelProperty(example = "null", value = "")
  @JsonProperty("active")
  public Boolean getActive() {
    return active;
  }
  public void setActive(Boolean active) {
    this.active = active;
  }

  

  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    User user = (User) o;
    return Objects.equals(this.id, user.id) &&
        Objects.equals(this.account, user.account) &&
        Objects.equals(this.userName, user.userName) &&
        Objects.equals(this.email, user.email) &&
        Objects.equals(this.firstName, user.firstName) &&
        Objects.equals(this.lastName, user.lastName) &&
        Objects.equals(this.lastLogin, user.lastLogin) &&
        Objects.equals(this.apiKey, user.apiKey) &&
        Objects.equals(this.feedKey, user.feedKey) &&
        Objects.equals(this.role, user.role) &&
        Objects.equals(this.status, user.status) &&
        Objects.equals(this.crmTags, user.crmTags) &&
        Objects.equals(this.crmLink, user.crmLink) &&
        Objects.equals(this.links, user.links) &&
        Objects.equals(this.permissions, user.permissions) &&
        Objects.equals(this.displayName, user.displayName) &&
        Objects.equals(this.active, user.active);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, account, userName, email, firstName, lastName, lastLogin, apiKey, feedKey, role, status, crmTags, crmLink, links, permissions, displayName, active);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class User {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    account: ").append(toIndentedString(account)).append("\n");
    sb.append("    userName: ").append(toIndentedString(userName)).append("\n");
    sb.append("    email: ").append(toIndentedString(email)).append("\n");
    sb.append("    firstName: ").append(toIndentedString(firstName)).append("\n");
    sb.append("    lastName: ").append(toIndentedString(lastName)).append("\n");
    sb.append("    lastLogin: ").append(toIndentedString(lastLogin)).append("\n");
    sb.append("    apiKey: ").append(toIndentedString(apiKey)).append("\n");
    sb.append("    feedKey: ").append(toIndentedString(feedKey)).append("\n");
    sb.append("    role: ").append(toIndentedString(role)).append("\n");
    sb.append("    status: ").append(toIndentedString(status)).append("\n");
    sb.append("    crmTags: ").append(toIndentedString(crmTags)).append("\n");
    sb.append("    crmLink: ").append(toIndentedString(crmLink)).append("\n");
    sb.append("    links: ").append(toIndentedString(links)).append("\n");
    sb.append("    permissions: ").append(toIndentedString(permissions)).append("\n");
    sb.append("    displayName: ").append(toIndentedString(displayName)).append("\n");
    sb.append("    active: ").append(toIndentedString(active)).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(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy