
org.touchbit.testrail4j.gson.model.Context 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 java.util.ArrayList;
import java.util.List;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Context {
@SerializedName("is_global")
@Expose
private Boolean isGlobal;
@SerializedName("project_ids")
@Expose
private List projectIds = new ArrayList();
/**
* No args constructor for use in serialization
*
*/
public Context() {
}
/**
*
* @param isGlobal
* @param projectIds
*/
public Context(Boolean isGlobal, List projectIds) {
super();
this.isGlobal = isGlobal;
this.projectIds = projectIds;
}
public Boolean getIsGlobal() {
return isGlobal;
}
public void setIsGlobal(Boolean isGlobal) {
this.isGlobal = isGlobal;
}
public Context withIsGlobal(Boolean isGlobal) {
this.isGlobal = isGlobal;
return this;
}
public List getProjectIds() {
return projectIds;
}
public void setProjectIds(List projectIds) {
this.projectIds = projectIds;
}
public Context withProjectIds(List projectIds) {
this.projectIds = projectIds;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Context.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("isGlobal");
sb.append('=');
sb.append(((this.isGlobal == null)?"":this.isGlobal));
sb.append(',');
sb.append("projectIds");
sb.append('=');
sb.append(((this.projectIds == null)?"":this.projectIds));
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.isGlobal == null)? 0 :this.isGlobal.hashCode()));
result = ((result* 31)+((this.projectIds == null)? 0 :this.projectIds.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Context) == false) {
return false;
}
Context rhs = ((Context) other);
return (((this.isGlobal == rhs.isGlobal)||((this.isGlobal!= null)&&this.isGlobal.equals(rhs.isGlobal)))&&((this.projectIds == rhs.projectIds)||((this.projectIds!= null)&&this.projectIds.equals(rhs.projectIds))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy