
org.touchbit.testrail4j.gson.model.TRMilestone 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 TRMilestone {
/**
* The date/time when the milestone was marked as completed (as UNIX timestamp)
*
*/
@SerializedName("completed_on")
@Expose
private Long completedOn;
/**
* The description of the milestone
*
*/
@SerializedName("description")
@Expose
private String description;
/**
* The due date/time of the milestone (as UNIX timestamp)
*
*/
@SerializedName("due_on")
@Expose
private Long dueOn;
/**
* The scheduled start date/time of the milestone (as UNIX timestamp) (available since TestRail 5.3)
*
*/
@SerializedName("start_on")
@Expose
private Long startOn;
/**
* The date/time when the milestone was started (as UNIX timestamp) (available since TestRail 5.3)
*
*/
@SerializedName("started_on")
@Expose
private Long startedOn;
/**
* The unique ID of the milestone
*
*/
@SerializedName("id")
@Expose
private Long id;
/**
* The ID of the parent milestone the milestone belongs to (if any) (available since TestRail 5.3)
*
*/
@SerializedName("parent_id")
@Expose
private Long parentId;
/**
* True if the milestone is marked as completed and false otherwise
*
*/
@SerializedName("is_completed")
@Expose
private Boolean isCompleted;
/**
* True if the milestone is marked as started and false otherwise (available since TestRail 5.3)
*
*/
@SerializedName("is_started")
@Expose
private Boolean isStarted;
/**
* The sub milestones that belong to the milestone (if any); only available with get_milestone (available since TestRail 5.3)
*
*/
@SerializedName("milestones")
@Expose
private List milestones = new ArrayList();
/**
* The name of the milestone
* (Required)
*
*/
@SerializedName("name")
@Expose
private String name;
/**
* The ID of the project the milestone belongs to
*
*/
@SerializedName("project_id")
@Expose
private Long projectId;
/**
* The address/URL of the milestone in the user interface
*
*/
@SerializedName("url")
@Expose
private String url;
/**
* A comma-separated list of references/requirements (available since TestRail 6.4)
*
*/
@SerializedName("refs")
@Expose
private String refs;
/**
* No args constructor for use in serialization
*
*/
public TRMilestone() {
}
/**
*
* @param dueOn
* @param description
* @param startOn
* @param isStarted
* @param parentId
* @param url
* @param refs
* @param completedOn
* @param name
* @param id
* @param milestones
* @param startedOn
* @param projectId
* @param isCompleted
*/
public TRMilestone(Long completedOn, String description, Long dueOn, Long startOn, Long startedOn, Long id, Long parentId, Boolean isCompleted, Boolean isStarted, List milestones, String name, Long projectId, String url, String refs) {
super();
this.completedOn = completedOn;
this.description = description;
this.dueOn = dueOn;
this.startOn = startOn;
this.startedOn = startedOn;
this.id = id;
this.parentId = parentId;
this.isCompleted = isCompleted;
this.isStarted = isStarted;
this.milestones = milestones;
this.name = name;
this.projectId = projectId;
this.url = url;
this.refs = refs;
}
/**
* The date/time when the milestone was marked as completed (as UNIX timestamp)
*
*/
public Long getCompletedOn() {
return completedOn;
}
/**
* The date/time when the milestone was marked as completed (as UNIX timestamp)
*
*/
public void setCompletedOn(Long completedOn) {
this.completedOn = completedOn;
}
public TRMilestone withCompletedOn(Long completedOn) {
this.completedOn = completedOn;
return this;
}
/**
* The description of the milestone
*
*/
public String getDescription() {
return description;
}
/**
* The description of the milestone
*
*/
public void setDescription(String description) {
this.description = description;
}
public TRMilestone withDescription(String description) {
this.description = description;
return this;
}
/**
* The due date/time of the milestone (as UNIX timestamp)
*
*/
public Long getDueOn() {
return dueOn;
}
/**
* The due date/time of the milestone (as UNIX timestamp)
*
*/
public void setDueOn(Long dueOn) {
this.dueOn = dueOn;
}
public TRMilestone withDueOn(Long dueOn) {
this.dueOn = dueOn;
return this;
}
/**
* The scheduled start date/time of the milestone (as UNIX timestamp) (available since TestRail 5.3)
*
*/
public Long getStartOn() {
return startOn;
}
/**
* The scheduled start date/time of the milestone (as UNIX timestamp) (available since TestRail 5.3)
*
*/
public void setStartOn(Long startOn) {
this.startOn = startOn;
}
public TRMilestone withStartOn(Long startOn) {
this.startOn = startOn;
return this;
}
/**
* The date/time when the milestone was started (as UNIX timestamp) (available since TestRail 5.3)
*
*/
public Long getStartedOn() {
return startedOn;
}
/**
* The date/time when the milestone was started (as UNIX timestamp) (available since TestRail 5.3)
*
*/
public void setStartedOn(Long startedOn) {
this.startedOn = startedOn;
}
public TRMilestone withStartedOn(Long startedOn) {
this.startedOn = startedOn;
return this;
}
/**
* The unique ID of the milestone
*
*/
public Long getId() {
return id;
}
/**
* The unique ID of the milestone
*
*/
public void setId(Long id) {
this.id = id;
}
public TRMilestone withId(Long id) {
this.id = id;
return this;
}
/**
* The ID of the parent milestone the milestone belongs to (if any) (available since TestRail 5.3)
*
*/
public Long getParentId() {
return parentId;
}
/**
* The ID of the parent milestone the milestone belongs to (if any) (available since TestRail 5.3)
*
*/
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public TRMilestone withParentId(Long parentId) {
this.parentId = parentId;
return this;
}
/**
* True if the milestone is marked as completed and false otherwise
*
*/
public Boolean getIsCompleted() {
return isCompleted;
}
/**
* True if the milestone is marked as completed and false otherwise
*
*/
public void setIsCompleted(Boolean isCompleted) {
this.isCompleted = isCompleted;
}
public TRMilestone withIsCompleted(Boolean isCompleted) {
this.isCompleted = isCompleted;
return this;
}
/**
* True if the milestone is marked as started and false otherwise (available since TestRail 5.3)
*
*/
public Boolean getIsStarted() {
return isStarted;
}
/**
* True if the milestone is marked as started and false otherwise (available since TestRail 5.3)
*
*/
public void setIsStarted(Boolean isStarted) {
this.isStarted = isStarted;
}
public TRMilestone withIsStarted(Boolean isStarted) {
this.isStarted = isStarted;
return this;
}
/**
* The sub milestones that belong to the milestone (if any); only available with get_milestone (available since TestRail 5.3)
*
*/
public List getMilestones() {
return milestones;
}
/**
* The sub milestones that belong to the milestone (if any); only available with get_milestone (available since TestRail 5.3)
*
*/
public void setMilestones(List milestones) {
this.milestones = milestones;
}
public TRMilestone withMilestones(List milestones) {
this.milestones = milestones;
return this;
}
/**
* The name of the milestone
* (Required)
*
*/
public String getName() {
return name;
}
/**
* The name of the milestone
* (Required)
*
*/
public void setName(String name) {
this.name = name;
}
public TRMilestone withName(String name) {
this.name = name;
return this;
}
/**
* The ID of the project the milestone belongs to
*
*/
public Long getProjectId() {
return projectId;
}
/**
* The ID of the project the milestone belongs to
*
*/
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public TRMilestone withProjectId(Long projectId) {
this.projectId = projectId;
return this;
}
/**
* The address/URL of the milestone in the user interface
*
*/
public String getUrl() {
return url;
}
/**
* The address/URL of the milestone in the user interface
*
*/
public void setUrl(String url) {
this.url = url;
}
public TRMilestone withUrl(String url) {
this.url = url;
return this;
}
/**
* A comma-separated list of references/requirements (available since TestRail 6.4)
*
*/
public String getRefs() {
return refs;
}
/**
* A comma-separated list of references/requirements (available since TestRail 6.4)
*
*/
public void setRefs(String refs) {
this.refs = refs;
}
public TRMilestone withRefs(String refs) {
this.refs = refs;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(TRMilestone.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("completedOn");
sb.append('=');
sb.append(((this.completedOn == null)?"":this.completedOn));
sb.append(',');
sb.append("description");
sb.append('=');
sb.append(((this.description == null)?"":this.description));
sb.append(',');
sb.append("dueOn");
sb.append('=');
sb.append(((this.dueOn == null)?"":this.dueOn));
sb.append(',');
sb.append("startOn");
sb.append('=');
sb.append(((this.startOn == null)?"":this.startOn));
sb.append(',');
sb.append("startedOn");
sb.append('=');
sb.append(((this.startedOn == null)?"":this.startedOn));
sb.append(',');
sb.append("id");
sb.append('=');
sb.append(((this.id == null)?"":this.id));
sb.append(',');
sb.append("parentId");
sb.append('=');
sb.append(((this.parentId == null)?"":this.parentId));
sb.append(',');
sb.append("isCompleted");
sb.append('=');
sb.append(((this.isCompleted == null)?"":this.isCompleted));
sb.append(',');
sb.append("isStarted");
sb.append('=');
sb.append(((this.isStarted == null)?"":this.isStarted));
sb.append(',');
sb.append("milestones");
sb.append('=');
sb.append(((this.milestones == null)?"":this.milestones));
sb.append(',');
sb.append("name");
sb.append('=');
sb.append(((this.name == null)?"":this.name));
sb.append(',');
sb.append("projectId");
sb.append('=');
sb.append(((this.projectId == null)?"":this.projectId));
sb.append(',');
sb.append("url");
sb.append('=');
sb.append(((this.url == null)?"":this.url));
sb.append(',');
sb.append("refs");
sb.append('=');
sb.append(((this.refs == null)?"":this.refs));
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.dueOn == null)? 0 :this.dueOn.hashCode()));
result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
result = ((result* 31)+((this.startOn == null)? 0 :this.startOn.hashCode()));
result = ((result* 31)+((this.isStarted == null)? 0 :this.isStarted.hashCode()));
result = ((result* 31)+((this.parentId == null)? 0 :this.parentId.hashCode()));
result = ((result* 31)+((this.url == null)? 0 :this.url.hashCode()));
result = ((result* 31)+((this.refs == null)? 0 :this.refs.hashCode()));
result = ((result* 31)+((this.completedOn == null)? 0 :this.completedOn.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.milestones == null)? 0 :this.milestones.hashCode()));
result = ((result* 31)+((this.startedOn == null)? 0 :this.startedOn.hashCode()));
result = ((result* 31)+((this.projectId == null)? 0 :this.projectId.hashCode()));
result = ((result* 31)+((this.isCompleted == null)? 0 :this.isCompleted.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof TRMilestone) == false) {
return false;
}
TRMilestone rhs = ((TRMilestone) other);
return (((((((((((((((this.dueOn == rhs.dueOn)||((this.dueOn!= null)&&this.dueOn.equals(rhs.dueOn)))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.startOn == rhs.startOn)||((this.startOn!= null)&&this.startOn.equals(rhs.startOn))))&&((this.isStarted == rhs.isStarted)||((this.isStarted!= null)&&this.isStarted.equals(rhs.isStarted))))&&((this.parentId == rhs.parentId)||((this.parentId!= null)&&this.parentId.equals(rhs.parentId))))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url))))&&((this.refs == rhs.refs)||((this.refs!= null)&&this.refs.equals(rhs.refs))))&&((this.completedOn == rhs.completedOn)||((this.completedOn!= null)&&this.completedOn.equals(rhs.completedOn))))&&((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.milestones == rhs.milestones)||((this.milestones!= null)&&this.milestones.equals(rhs.milestones))))&&((this.startedOn == rhs.startedOn)||((this.startedOn!= null)&&this.startedOn.equals(rhs.startedOn))))&&((this.projectId == rhs.projectId)||((this.projectId!= null)&&this.projectId.equals(rhs.projectId))))&&((this.isCompleted == rhs.isCompleted)||((this.isCompleted!= null)&&this.isCompleted.equals(rhs.isCompleted))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy