
org.touchbit.testrail4j.gson.model.TRUser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gson-api-model Show documentation
Show all versions of gson-api-model Show documentation
Gson annotation models for TestRail API
The newest version!
package org.touchbit.testrail4j.gson.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class TRUser {
/**
* The email address of the user as configured in TestRail
* (Required)
*
*/
@SerializedName("email")
@Expose
private String email;
/**
* The unique ID of the user
* (Required)
*
*/
@SerializedName("id")
@Expose
private Long id;
/**
* True if the user is active and false otherwise
* (Required)
*
*/
@SerializedName("is_active")
@Expose
private Boolean isActive;
/**
* The full name of the user
* (Required)
*
*/
@SerializedName("name")
@Expose
private String name;
/**
* The Name of the user’s globally assigned role (Requires TestRail 6.4 or later)
*
*/
@SerializedName("role")
@Expose
private String role;
/**
* The unique ID of the user’s globally assigned role (Requires TestRail 6.4 or later)
*
*/
@SerializedName("role_id")
@Expose
private Long roleId;
/**
* No args constructor for use in serialization
*
*/
public TRUser() {
}
/**
*
* @param role
* @param roleId
* @param name
* @param id
* @param isActive
* @param email
*/
public TRUser(String email, Long id, Boolean isActive, String name, String role, Long roleId) {
super();
this.email = email;
this.id = id;
this.isActive = isActive;
this.name = name;
this.role = role;
this.roleId = roleId;
}
/**
* The email address of the user as configured in TestRail
* (Required)
*
*/
public String getEmail() {
return email;
}
/**
* The email address of the user as configured in TestRail
* (Required)
*
*/
public void setEmail(String email) {
this.email = email;
}
public TRUser withEmail(String email) {
this.email = email;
return this;
}
/**
* The unique ID of the user
* (Required)
*
*/
public Long getId() {
return id;
}
/**
* The unique ID of the user
* (Required)
*
*/
public void setId(Long id) {
this.id = id;
}
public TRUser withId(Long id) {
this.id = id;
return this;
}
/**
* True if the user is active and false otherwise
* (Required)
*
*/
public Boolean getIsActive() {
return isActive;
}
/**
* True if the user is active and false otherwise
* (Required)
*
*/
public void setIsActive(Boolean isActive) {
this.isActive = isActive;
}
public TRUser withIsActive(Boolean isActive) {
this.isActive = isActive;
return this;
}
/**
* The full name of the user
* (Required)
*
*/
public String getName() {
return name;
}
/**
* The full name of the user
* (Required)
*
*/
public void setName(String name) {
this.name = name;
}
public TRUser withName(String name) {
this.name = name;
return this;
}
/**
* The Name of the user’s globally assigned role (Requires TestRail 6.4 or later)
*
*/
public String getRole() {
return role;
}
/**
* The Name of the user’s globally assigned role (Requires TestRail 6.4 or later)
*
*/
public void setRole(String role) {
this.role = role;
}
public TRUser withRole(String role) {
this.role = role;
return this;
}
/**
* The unique ID of the user’s globally assigned role (Requires TestRail 6.4 or later)
*
*/
public Long getRoleId() {
return roleId;
}
/**
* The unique ID of the user’s globally assigned role (Requires TestRail 6.4 or later)
*
*/
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
public TRUser withRoleId(Long roleId) {
this.roleId = roleId;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(TRUser.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("email");
sb.append('=');
sb.append(((this.email == null)?"":this.email));
sb.append(',');
sb.append("id");
sb.append('=');
sb.append(((this.id == null)?"":this.id));
sb.append(',');
sb.append("isActive");
sb.append('=');
sb.append(((this.isActive == null)?"":this.isActive));
sb.append(',');
sb.append("name");
sb.append('=');
sb.append(((this.name == null)?"":this.name));
sb.append(',');
sb.append("role");
sb.append('=');
sb.append(((this.role == null)?"":this.role));
sb.append(',');
sb.append("roleId");
sb.append('=');
sb.append(((this.roleId == null)?"":this.roleId));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.role == null)? 0 :this.role.hashCode()));
result = ((result* 31)+((this.roleId == null)? 0 :this.roleId.hashCode()));
result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
result = ((result* 31)+((this.isActive == null)? 0 :this.isActive.hashCode()));
result = ((result* 31)+((this.email == null)? 0 :this.email.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof TRUser) == false) {
return false;
}
TRUser rhs = ((TRUser) other);
return (((((((this.role == rhs.role)||((this.role!= null)&&this.role.equals(rhs.role)))&&((this.roleId == rhs.roleId)||((this.roleId!= null)&&this.roleId.equals(rhs.roleId))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.isActive == rhs.isActive)||((this.isActive!= null)&&this.isActive.equals(rhs.isActive))))&&((this.email == rhs.email)||((this.email!= null)&&this.email.equals(rhs.email))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy