org.owasp.dependencycheck.data.nvd.json.DefImpact Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-check-core Show documentation
Show all versions of dependency-check-core Show documentation
dependency-check-core is the engine and reporting tool used to identify and report if there are any known, publicly disclosed vulnerabilities in the scanned project's dependencies. The engine extracts meta-data from the dependencies and uses this to do fuzzy key-word matching against the Common Platfrom Enumeration (CPE), if any CPE identifiers are found the associated Common Vulnerability and Exposure (CVE) entries are added to the generated report.
package org.owasp.dependencycheck.data.nvd.json;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Impact scores for a vulnerability as found on NVD.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"baseMetricV3",
"baseMetricV2"
})
@Generated("jsonschema2pojo")
public class DefImpact {
/**
* CVSS V3.x score.
*
*/
@JsonProperty("baseMetricV3")
@JsonPropertyDescription("CVSS V3.x score.")
private BaseMetricV3 baseMetricV3;
/**
* CVSS V2.0 score.
*
*/
@JsonProperty("baseMetricV2")
@JsonPropertyDescription("CVSS V2.0 score.")
private BaseMetricV2 baseMetricV2;
@JsonIgnore
private Map additionalProperties = new LinkedHashMap();
/**
* CVSS V3.x score.
*
*/
@JsonProperty("baseMetricV3")
public BaseMetricV3 getBaseMetricV3() {
return baseMetricV3;
}
/**
* CVSS V3.x score.
*
*/
@JsonProperty("baseMetricV3")
public void setBaseMetricV3(BaseMetricV3 baseMetricV3) {
this.baseMetricV3 = baseMetricV3;
}
/**
* CVSS V2.0 score.
*
*/
@JsonProperty("baseMetricV2")
public BaseMetricV2 getBaseMetricV2() {
return baseMetricV2;
}
/**
* CVSS V2.0 score.
*
*/
@JsonProperty("baseMetricV2")
public void setBaseMetricV2(BaseMetricV2 baseMetricV2) {
this.baseMetricV2 = baseMetricV2;
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(DefImpact.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("baseMetricV3");
sb.append('=');
sb.append(((this.baseMetricV3 == null)?"":this.baseMetricV3));
sb.append(',');
sb.append("baseMetricV2");
sb.append('=');
sb.append(((this.baseMetricV2 == null)?"":this.baseMetricV2));
sb.append(',');
sb.append("additionalProperties");
sb.append('=');
sb.append(((this.additionalProperties == null)?"":this.additionalProperties));
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.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.baseMetricV2 == null)? 0 :this.baseMetricV2 .hashCode()));
result = ((result* 31)+((this.baseMetricV3 == null)? 0 :this.baseMetricV3 .hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof DefImpact) == false) {
return false;
}
DefImpact rhs = ((DefImpact) other);
return ((((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))&&((this.baseMetricV2 == rhs.baseMetricV2)||((this.baseMetricV2 != null)&&this.baseMetricV2 .equals(rhs.baseMetricV2))))&&((this.baseMetricV3 == rhs.baseMetricV3)||((this.baseMetricV3 != null)&&this.baseMetricV3 .equals(rhs.baseMetricV3))));
}
}