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

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

The newest version!

package org.touchbit.testrail4j.gson.model;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class TRProject {

    /**
     * The description/announcement of the project
     * 
     */
    @SerializedName("announcement")
    @Expose
    private String announcement;
    /**
     * The date/time when the project was marked as completed (as UNIX timestamp)
     * 
     */
    @SerializedName("completed_on")
    @Expose
    private Long completedOn;
    /**
     * The unique ID of the project
     * 
     */
    @SerializedName("id")
    @Expose
    private Long id;
    /**
     * True if the project is marked as completed and false otherwise
     * 
     */
    @SerializedName("is_completed")
    @Expose
    private Boolean isCompleted;
    /**
     * The name of the project
     * 
     */
    @SerializedName("name")
    @Expose
    private String name;
    /**
     * True to show the announcement/description and false otherwise
     * 
     */
    @SerializedName("show_announcement")
    @Expose
    private Boolean showAnnouncement;
    /**
     * The address/URL of the project in the user interface
     * 
     */
    @SerializedName("url")
    @Expose
    private String url;
    /**
     * The suite mode of the project (1 for single suite mode, 2 for single suite + baselines, 3 for multiple suites) (added with TestRail 4.0)
     * 
     */
    @SerializedName("suite_mode")
    @Expose
    private Long suiteMode;

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

    /**
     * 
     * @param suiteMode
     * @param completedOn
     * @param name
     * @param id
     * @param showAnnouncement
     * @param url
     * @param announcement
     * @param isCompleted
     */
    public TRProject(String announcement, Long completedOn, Long id, Boolean isCompleted, String name, Boolean showAnnouncement, String url, Long suiteMode) {
        super();
        this.announcement = announcement;
        this.completedOn = completedOn;
        this.id = id;
        this.isCompleted = isCompleted;
        this.name = name;
        this.showAnnouncement = showAnnouncement;
        this.url = url;
        this.suiteMode = suiteMode;
    }

    /**
     * The description/announcement of the project
     * 
     */
    public String getAnnouncement() {
        return announcement;
    }

    /**
     * The description/announcement of the project
     * 
     */
    public void setAnnouncement(String announcement) {
        this.announcement = announcement;
    }

    public TRProject withAnnouncement(String announcement) {
        this.announcement = announcement;
        return this;
    }

    /**
     * The date/time when the project was marked as completed (as UNIX timestamp)
     * 
     */
    public Long getCompletedOn() {
        return completedOn;
    }

    /**
     * The date/time when the project was marked as completed (as UNIX timestamp)
     * 
     */
    public void setCompletedOn(Long completedOn) {
        this.completedOn = completedOn;
    }

    public TRProject withCompletedOn(Long completedOn) {
        this.completedOn = completedOn;
        return this;
    }

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

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

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

    /**
     * True if the project is marked as completed and false otherwise
     * 
     */
    public Boolean getIsCompleted() {
        return isCompleted;
    }

    /**
     * True if the project is marked as completed and false otherwise
     * 
     */
    public void setIsCompleted(Boolean isCompleted) {
        this.isCompleted = isCompleted;
    }

    public TRProject withIsCompleted(Boolean isCompleted) {
        this.isCompleted = isCompleted;
        return this;
    }

    /**
     * The name of the project
     * 
     */
    public String getName() {
        return name;
    }

    /**
     * The name of the project
     * 
     */
    public void setName(String name) {
        this.name = name;
    }

    public TRProject withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * True to show the announcement/description and false otherwise
     * 
     */
    public Boolean getShowAnnouncement() {
        return showAnnouncement;
    }

    /**
     * True to show the announcement/description and false otherwise
     * 
     */
    public void setShowAnnouncement(Boolean showAnnouncement) {
        this.showAnnouncement = showAnnouncement;
    }

    public TRProject withShowAnnouncement(Boolean showAnnouncement) {
        this.showAnnouncement = showAnnouncement;
        return this;
    }

    /**
     * The address/URL of the project in the user interface
     * 
     */
    public String getUrl() {
        return url;
    }

    /**
     * The address/URL of the project in the user interface
     * 
     */
    public void setUrl(String url) {
        this.url = url;
    }

    public TRProject withUrl(String url) {
        this.url = url;
        return this;
    }

    /**
     * The suite mode of the project (1 for single suite mode, 2 for single suite + baselines, 3 for multiple suites) (added with TestRail 4.0)
     * 
     */
    public Long getSuiteMode() {
        return suiteMode;
    }

    /**
     * The suite mode of the project (1 for single suite mode, 2 for single suite + baselines, 3 for multiple suites) (added with TestRail 4.0)
     * 
     */
    public void setSuiteMode(Long suiteMode) {
        this.suiteMode = suiteMode;
    }

    public TRProject withSuiteMode(Long suiteMode) {
        this.suiteMode = suiteMode;
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRProject.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("announcement");
        sb.append('=');
        sb.append(((this.announcement == null)?"":this.announcement));
        sb.append(',');
        sb.append("completedOn");
        sb.append('=');
        sb.append(((this.completedOn == null)?"":this.completedOn));
        sb.append(',');
        sb.append("id");
        sb.append('=');
        sb.append(((this.id == null)?"":this.id));
        sb.append(',');
        sb.append("isCompleted");
        sb.append('=');
        sb.append(((this.isCompleted == null)?"":this.isCompleted));
        sb.append(',');
        sb.append("name");
        sb.append('=');
        sb.append(((this.name == null)?"":this.name));
        sb.append(',');
        sb.append("showAnnouncement");
        sb.append('=');
        sb.append(((this.showAnnouncement == null)?"":this.showAnnouncement));
        sb.append(',');
        sb.append("url");
        sb.append('=');
        sb.append(((this.url == null)?"":this.url));
        sb.append(',');
        sb.append("suiteMode");
        sb.append('=');
        sb.append(((this.suiteMode == null)?"":this.suiteMode));
        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.suiteMode == null)? 0 :this.suiteMode.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.showAnnouncement == null)? 0 :this.showAnnouncement.hashCode()));
        result = ((result* 31)+((this.url == null)? 0 :this.url.hashCode()));
        result = ((result* 31)+((this.announcement == null)? 0 :this.announcement.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 TRProject) == false) {
            return false;
        }
        TRProject rhs = ((TRProject) other);
        return (((((((((this.suiteMode == rhs.suiteMode)||((this.suiteMode!= null)&&this.suiteMode.equals(rhs.suiteMode)))&&((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.showAnnouncement == rhs.showAnnouncement)||((this.showAnnouncement!= null)&&this.showAnnouncement.equals(rhs.showAnnouncement))))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url))))&&((this.announcement == rhs.announcement)||((this.announcement!= null)&&this.announcement.equals(rhs.announcement))))&&((this.isCompleted == rhs.isCompleted)||((this.isCompleted!= null)&&this.isCompleted.equals(rhs.isCompleted))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy