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

org.owasp.dependencycheck.data.nvd.json.VersionDatum Maven / Gradle / Ivy


package org.owasp.dependencycheck.data.nvd.json;

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

public class VersionDatum {

    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("version_value")
    @Expose
    private String versionValue;
    @SerializedName("version_affected")
    @Expose
    private String versionAffected;

    /**
     * 
     * (Required)
     * 
     */
    public String getVersionValue() {
        return versionValue;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setVersionValue(String versionValue) {
        this.versionValue = versionValue;
    }

    public String getVersionAffected() {
        return versionAffected;
    }

    public void setVersionAffected(String versionAffected) {
        this.versionAffected = versionAffected;
    }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy