DefCveItem.java
- 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;
- /**
- * Defines a vulnerability in the NVD data feed.
- *
- */
- @JsonInclude(JsonInclude.Include.NON_NULL)
- @JsonPropertyOrder({
- "cve",
- "configurations",
- "impact"
- })
- @Generated("jsonschema2pojo")
- public class DefCveItem {
- /**
- *
- * (Required)
- *
- */
- @JsonProperty("cve")
- private CVEJSON40Min11 cve;
- /**
- * Defines the set of product configurations for a NVD applicability statement.
- *
- */
- @JsonProperty("configurations")
- @JsonPropertyDescription("Defines the set of product configurations for a NVD applicability statement.")
- private DefConfigurations configurations;
- /**
- * Impact scores for a vulnerability as found on NVD.
- *
- */
- @JsonProperty("impact")
- @JsonPropertyDescription("Impact scores for a vulnerability as found on NVD.")
- private DefImpact impact;
- @JsonIgnore
- private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();
- /**
- *
- * (Required)
- *
- */
- @JsonProperty("cve")
- public CVEJSON40Min11 getCve() {
- return cve;
- }
- /**
- *
- * (Required)
- *
- */
- @JsonProperty("cve")
- public void setCve(CVEJSON40Min11 cve) {
- this.cve = cve;
- }
- /**
- * Defines the set of product configurations for a NVD applicability statement.
- *
- */
- @JsonProperty("configurations")
- public DefConfigurations getConfigurations() {
- return configurations;
- }
- /**
- * Defines the set of product configurations for a NVD applicability statement.
- *
- */
- @JsonProperty("configurations")
- public void setConfigurations(DefConfigurations configurations) {
- this.configurations = configurations;
- }
- /**
- * Impact scores for a vulnerability as found on NVD.
- *
- */
- @JsonProperty("impact")
- public DefImpact getImpact() {
- return impact;
- }
- /**
- * Impact scores for a vulnerability as found on NVD.
- *
- */
- @JsonProperty("impact")
- public void setImpact(DefImpact impact) {
- this.impact = impact;
- }
- @JsonAnyGetter
- public Map<String, Object> 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(DefCveItem.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
- sb.append("cve");
- sb.append('=');
- sb.append(((this.cve == null)?"<null>":this.cve));
- sb.append(',');
- sb.append("configurations");
- sb.append('=');
- sb.append(((this.configurations == null)?"<null>":this.configurations));
- sb.append(',');
- sb.append("impact");
- sb.append('=');
- sb.append(((this.impact == null)?"<null>":this.impact));
- sb.append(',');
- sb.append("additionalProperties");
- sb.append('=');
- sb.append(((this.additionalProperties == null)?"<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.cve == null)? 0 :this.cve.hashCode()));
- result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
- result = ((result* 31)+((this.configurations == null)? 0 :this.configurations.hashCode()));
- result = ((result* 31)+((this.impact == null)? 0 :this.impact.hashCode()));
- return result;
- }
- @Override
- public boolean equals(Object other) {
- if (other == this) {
- return true;
- }
- if ((other instanceof DefCveItem) == false) {
- return false;
- }
- DefCveItem rhs = ((DefCveItem) other);
- return (((((this.cve == rhs.cve)||((this.cve!= null)&&this.cve.equals(rhs.cve)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.configurations == rhs.configurations)||((this.configurations!= null)&&this.configurations.equals(rhs.configurations))))&&((this.impact == rhs.impact)||((this.impact!= null)&&this.impact.equals(rhs.impact))));
- }
- }