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

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


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

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


/**
 * CPE name
 * 
 */
public class DefCpeName {

    @SerializedName("cpe22Uri")
    @Expose
    private String cpe22Uri;
    /**
     * 
     * (Required)
     * 
     */
    @SerializedName("cpe23Uri")
    @Expose
    private String cpe23Uri;

    public String getCpe22Uri() {
        return cpe22Uri;
    }

    public void setCpe22Uri(String cpe22Uri) {
        this.cpe22Uri = cpe22Uri;
    }

    /**
     * 
     * (Required)
     * 
     */
    public String getCpe23Uri() {
        return cpe23Uri;
    }

    /**
     * 
     * (Required)
     * 
     */
    public void setCpe23Uri(String cpe23Uri) {
        this.cpe23Uri = cpe23Uri;
    }

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

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy