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

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

    /**
     * Error message
     * (Required)
     * 
     */
    @SerializedName("error")
    @Expose
    private String error;

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

    /**
     * 
     * @param error
     */
    public TRError(String error) {
        super();
        this.error = error;
    }

    /**
     * Error message
     * (Required)
     * 
     */
    public String getError() {
        return error;
    }

    /**
     * Error message
     * (Required)
     * 
     */
    public void setError(String error) {
        this.error = error;
    }

    public TRError withError(String error) {
        this.error = error;
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(TRError.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("error");
        sb.append('=');
        sb.append(((this.error == null)?"":this.error));
        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.error == null)? 0 :this.error.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof TRError) == false) {
            return false;
        }
        TRError rhs = ((TRError) other);
        return ((this.error == rhs.error)||((this.error!= null)&&this.error.equals(rhs.error)));
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy