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
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;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
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() {
return new ToStringBuilder(this).append("isGlobal", isGlobal).append("projectIds", projectIds).toString();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(isGlobal).append(projectIds).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Context) == false) {
return false;
}
Context rhs = ((Context) other);
return new EqualsBuilder().append(isGlobal, rhs.isGlobal).append(projectIds, rhs.projectIds).isEquals();
}
}