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

org.touchbit.testrail4j.gson.model.TRResult Maven / Gradle / Ivy

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 TRResult {

    /**
     * Attachments
     * 
     */
    @SerializedName("attachment_ids")
    @Expose
    private List attachmentIds = new ArrayList();
    /**
     * The unique ID of the test result
     * 
     */
    @SerializedName("id")
    @Expose
    private Long id;
    /**
     * The ID of the test case (Util field. Not returned in response.)
     * 
     */
    @SerializedName("case_id")
    @Expose
    private Long caseId;
    /**
     * The status of the test result, e.g. passed or failed
     * 
     */
    @SerializedName("status_id")
    @Expose
    private Long statusId;
    /**
     * The ID of the test this test result belongs to
     * 
     */
    @SerializedName("test_id")
    @Expose
    private Long testId;
    /**
     * The comment or error message of the test result
     * 
     */
    @SerializedName("comment")
    @Expose
    private String comment;
    /**
     * A comma-separated list of defects linked to the test result
     * 
     */
    @SerializedName("defects")
    @Expose
    private String defects;
    /**
     * The (build) version the test was executed against
     * 
     */
    @SerializedName("version")
    @Expose
    private String version;
    /**
     * The amount of time it took to execute the test (e.g. '1m' or '2m 30s')
     * 
     */
    @SerializedName("elapsed")
    @Expose
    private String elapsed;
    /**
     * The ID of the user who created the test result
     * 
     */
    @SerializedName("created_by")
    @Expose
    private Long createdBy;
    /**
     * The date/time when the test result was created (as UNIX timestamp)
     * 
     */
    @SerializedName("created_on")
    @Expose
    private Long createdOn;
    /**
     * The ID of the assignee (user) of the test result
     * 
     */
    @SerializedName("assignedto_id")
    @Expose
    private Long assignedtoId;
    /**
     * Test Case (Steps) template results
     * 
     */
    @SerializedName("custom_step_results")
    @Expose
    private List customStepResults = new ArrayList();

    /**
     * No args constructor for use in serialization
     * 
     */
    public TRResult() {
    }

    /**
     * 
     * @param customStepResults
     * @param version
     * @param createdOn
     * @param elapsed
     * @param statusId
     * @param createdBy
     * @param assignedtoId
     * @param caseId
     * @param defects
     * @param attachmentIds
     * @param testId
     * @param comment
     * @param id
     */
    public TRResult(List attachmentIds, Long id, Long caseId, Long statusId, Long testId, String comment, String defects, String version, String elapsed, Long createdBy, Long createdOn, Long assignedtoId, List customStepResults) {
        super();
        this.attachmentIds = attachmentIds;
        this.id = id;
        this.caseId = caseId;
        this.statusId = statusId;
        this.testId = testId;
        this.comment = comment;
        this.defects = defects;
        this.version = version;
        this.elapsed = elapsed;
        this.createdBy = createdBy;
        this.createdOn = createdOn;
        this.assignedtoId = assignedtoId;
        this.customStepResults = customStepResults;
    }

    /**
     * Attachments
     * 
     */
    public List getAttachmentIds() {
        return attachmentIds;
    }

    /**
     * Attachments
     * 
     */
    public void setAttachmentIds(List attachmentIds) {
        this.attachmentIds = attachmentIds;
    }

    public TRResult withAttachmentIds(List attachmentIds) {
        this.attachmentIds = attachmentIds;
        return this;
    }

    /**
     * The unique ID of the test result
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * The unique ID of the test result
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    public TRResult withId(Long id) {
        this.id = id;
        return this;
    }

    /**
     * The ID of the test case (Util field. Not returned in response.)
     * 
     */
    public Long getCaseId() {
        return caseId;
    }

    /**
     * The ID of the test case (Util field. Not returned in response.)
     * 
     */
    public void setCaseId(Long caseId) {
        this.caseId = caseId;
    }

    public TRResult withCaseId(Long caseId) {
        this.caseId = caseId;
        return this;
    }

    /**
     * The status of the test result, e.g. passed or failed
     * 
     */
    public Long getStatusId() {
        return statusId;
    }

    /**
     * The status of the test result, e.g. passed or failed
     * 
     */
    public void setStatusId(Long statusId) {
        this.statusId = statusId;
    }

    public TRResult withStatusId(Long statusId) {
        this.statusId = statusId;
        return this;
    }

    /**
     * The ID of the test this test result belongs to
     * 
     */
    public Long getTestId() {
        return testId;
    }

    /**
     * The ID of the test this test result belongs to
     * 
     */
    public void setTestId(Long testId) {
        this.testId = testId;
    }

    public TRResult withTestId(Long testId) {
        this.testId = testId;
        return this;
    }

    /**
     * The comment or error message of the test result
     * 
     */
    public String getComment() {
        return comment;
    }

    /**
     * The comment or error message of the test result
     * 
     */
    public void setComment(String comment) {
        this.comment = comment;
    }

    public TRResult withComment(String comment) {
        this.comment = comment;
        return this;
    }

    /**
     * A comma-separated list of defects linked to the test result
     * 
     */
    public String getDefects() {
        return defects;
    }

    /**
     * A comma-separated list of defects linked to the test result
     * 
     */
    public void setDefects(String defects) {
        this.defects = defects;
    }

    public TRResult withDefects(String defects) {
        this.defects = defects;
        return this;
    }

    /**
     * The (build) version the test was executed against
     * 
     */
    public String getVersion() {
        return version;
    }

    /**
     * The (build) version the test was executed against
     * 
     */
    public void setVersion(String version) {
        this.version = version;
    }

    public TRResult withVersion(String version) {
        this.version = version;
        return this;
    }

    /**
     * The amount of time it took to execute the test (e.g. '1m' or '2m 30s')
     * 
     */
    public String getElapsed() {
        return elapsed;
    }

    /**
     * The amount of time it took to execute the test (e.g. '1m' or '2m 30s')
     * 
     */
    public void setElapsed(String elapsed) {
        this.elapsed = elapsed;
    }

    public TRResult withElapsed(String elapsed) {
        this.elapsed = elapsed;
        return this;
    }

    /**
     * The ID of the user who created the test result
     * 
     */
    public Long getCreatedBy() {
        return createdBy;
    }

    /**
     * The ID of the user who created the test result
     * 
     */
    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public TRResult withCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
        return this;
    }

    /**
     * The date/time when the test result was created (as UNIX timestamp)
     * 
     */
    public Long getCreatedOn() {
        return createdOn;
    }

    /**
     * The date/time when the test result was created (as UNIX timestamp)
     * 
     */
    public void setCreatedOn(Long createdOn) {
        this.createdOn = createdOn;
    }

    public TRResult withCreatedOn(Long createdOn) {
        this.createdOn = createdOn;
        return this;
    }

    /**
     * The ID of the assignee (user) of the test result
     * 
     */
    public Long getAssignedtoId() {
        return assignedtoId;
    }

    /**
     * The ID of the assignee (user) of the test result
     * 
     */
    public void setAssignedtoId(Long assignedtoId) {
        this.assignedtoId = assignedtoId;
    }

    public TRResult withAssignedtoId(Long assignedtoId) {
        this.assignedtoId = assignedtoId;
        return this;
    }

    /**
     * Test Case (Steps) template results
     * 
     */
    public List getCustomStepResults() {
        return customStepResults;
    }

    /**
     * Test Case (Steps) template results
     * 
     */
    public void setCustomStepResults(List customStepResults) {
        this.customStepResults = customStepResults;
    }

    public TRResult withCustomStepResults(List customStepResults) {
        this.customStepResults = customStepResults;
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRResult.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("attachmentIds");
        sb.append('=');
        sb.append(((this.attachmentIds == null)?"":this.attachmentIds));
        sb.append(',');
        sb.append("id");
        sb.append('=');
        sb.append(((this.id == null)?"":this.id));
        sb.append(',');
        sb.append("caseId");
        sb.append('=');
        sb.append(((this.caseId == null)?"":this.caseId));
        sb.append(',');
        sb.append("statusId");
        sb.append('=');
        sb.append(((this.statusId == null)?"":this.statusId));
        sb.append(',');
        sb.append("testId");
        sb.append('=');
        sb.append(((this.testId == null)?"":this.testId));
        sb.append(',');
        sb.append("comment");
        sb.append('=');
        sb.append(((this.comment == null)?"":this.comment));
        sb.append(',');
        sb.append("defects");
        sb.append('=');
        sb.append(((this.defects == null)?"":this.defects));
        sb.append(',');
        sb.append("version");
        sb.append('=');
        sb.append(((this.version == null)?"":this.version));
        sb.append(',');
        sb.append("elapsed");
        sb.append('=');
        sb.append(((this.elapsed == null)?"":this.elapsed));
        sb.append(',');
        sb.append("createdBy");
        sb.append('=');
        sb.append(((this.createdBy == null)?"":this.createdBy));
        sb.append(',');
        sb.append("createdOn");
        sb.append('=');
        sb.append(((this.createdOn == null)?"":this.createdOn));
        sb.append(',');
        sb.append("assignedtoId");
        sb.append('=');
        sb.append(((this.assignedtoId == null)?"":this.assignedtoId));
        sb.append(',');
        sb.append("customStepResults");
        sb.append('=');
        sb.append(((this.customStepResults == null)?"":this.customStepResults));
        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.customStepResults == null)? 0 :this.customStepResults.hashCode()));
        result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode()));
        result = ((result* 31)+((this.createdOn == null)? 0 :this.createdOn.hashCode()));
        result = ((result* 31)+((this.elapsed == null)? 0 :this.elapsed.hashCode()));
        result = ((result* 31)+((this.statusId == null)? 0 :this.statusId.hashCode()));
        result = ((result* 31)+((this.createdBy == null)? 0 :this.createdBy.hashCode()));
        result = ((result* 31)+((this.assignedtoId == null)? 0 :this.assignedtoId.hashCode()));
        result = ((result* 31)+((this.caseId == null)? 0 :this.caseId.hashCode()));
        result = ((result* 31)+((this.defects == null)? 0 :this.defects.hashCode()));
        result = ((result* 31)+((this.attachmentIds == null)? 0 :this.attachmentIds.hashCode()));
        result = ((result* 31)+((this.testId == null)? 0 :this.testId.hashCode()));
        result = ((result* 31)+((this.comment == null)? 0 :this.comment.hashCode()));
        result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof TRResult) == false) {
            return false;
        }
        TRResult rhs = ((TRResult) other);
        return ((((((((((((((this.customStepResults == rhs.customStepResults)||((this.customStepResults!= null)&&this.customStepResults.equals(rhs.customStepResults)))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.createdOn == rhs.createdOn)||((this.createdOn!= null)&&this.createdOn.equals(rhs.createdOn))))&&((this.elapsed == rhs.elapsed)||((this.elapsed!= null)&&this.elapsed.equals(rhs.elapsed))))&&((this.statusId == rhs.statusId)||((this.statusId!= null)&&this.statusId.equals(rhs.statusId))))&&((this.createdBy == rhs.createdBy)||((this.createdBy!= null)&&this.createdBy.equals(rhs.createdBy))))&&((this.assignedtoId == rhs.assignedtoId)||((this.assignedtoId!= null)&&this.assignedtoId.equals(rhs.assignedtoId))))&&((this.caseId == rhs.caseId)||((this.caseId!= null)&&this.caseId.equals(rhs.caseId))))&&((this.defects == rhs.defects)||((this.defects!= null)&&this.defects.equals(rhs.defects))))&&((this.attachmentIds == rhs.attachmentIds)||((this.attachmentIds!= null)&&this.attachmentIds.equals(rhs.attachmentIds))))&&((this.testId == rhs.testId)||((this.testId!= null)&&this.testId.equals(rhs.testId))))&&((this.comment == rhs.comment)||((this.comment!= null)&&this.comment.equals(rhs.comment))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy