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

org.touchbit.testrail4j.gson.model.TRPriority 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 TRPriority {

    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("id")
    @Expose
    private Long id;
    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("is_default")
    @Expose
    private Boolean isDefault;
    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("name")
    @Expose
    private String name;
    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("priority")
    @Expose
    private Long priority;
    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("short_name")
    @Expose
    private String shortName;

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

    /**
     * 
     * @param isDefault
     * @param name
     * @param id
     * @param priority
     * @param shortName
     */
    public TRPriority(Long id, Boolean isDefault, String name, Long priority, String shortName) {
        super();
        this.id = id;
        this.isDefault = isDefault;
        this.name = name;
        this.priority = priority;
        this.shortName = shortName;
    }

    /**
     * 
     * (Required)
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

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

    /**
     * 
     * (Required)
     * 
     */
    public Boolean getIsDefault() {
        return isDefault;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setIsDefault(Boolean isDefault) {
        this.isDefault = isDefault;
    }

    public TRPriority withIsDefault(Boolean isDefault) {
        this.isDefault = isDefault;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     */
    public String getName() {
        return name;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setName(String name) {
        this.name = name;
    }

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

    /**
     * 
     * (Required)
     * 
     */
    public Long getPriority() {
        return priority;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setPriority(Long priority) {
        this.priority = priority;
    }

    public TRPriority withPriority(Long priority) {
        this.priority = priority;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     */
    public String getShortName() {
        return shortName;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public TRPriority withShortName(String shortName) {
        this.shortName = shortName;
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRPriority.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("id");
        sb.append('=');
        sb.append(((this.id == null)?"":this.id));
        sb.append(',');
        sb.append("isDefault");
        sb.append('=');
        sb.append(((this.isDefault == null)?"":this.isDefault));
        sb.append(',');
        sb.append("name");
        sb.append('=');
        sb.append(((this.name == null)?"":this.name));
        sb.append(',');
        sb.append("priority");
        sb.append('=');
        sb.append(((this.priority == null)?"":this.priority));
        sb.append(',');
        sb.append("shortName");
        sb.append('=');
        sb.append(((this.shortName == null)?"":this.shortName));
        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.name == null)? 0 :this.name.hashCode()));
        result = ((result* 31)+((this.isDefault == null)? 0 :this.isDefault.hashCode()));
        result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
        result = ((result* 31)+((this.priority == null)? 0 :this.priority.hashCode()));
        result = ((result* 31)+((this.shortName == null)? 0 :this.shortName.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof TRPriority) == false) {
            return false;
        }
        TRPriority rhs = ((TRPriority) other);
        return ((((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.isDefault == rhs.isDefault)||((this.isDefault!= null)&&this.isDefault.equals(rhs.isDefault))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.priority == rhs.priority)||((this.priority!= null)&&this.priority.equals(rhs.priority))))&&((this.shortName == rhs.shortName)||((this.shortName!= null)&&this.shortName.equals(rhs.shortName))));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy