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

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

Go to download

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.

There is a newer version: 10.0.4
Show newest version

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

import java.util.HashMap;
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.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;


/**
 * JSON Schema for Common Vulnerability Scoring System version 2.0
 * 

* * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "accessVector", "accessComplexity", "authentication", "confidentialityImpact", "integrityImpact", "availabilityImpact", "baseScore" }) @Generated("jsonschema2pojo") public class CvssV20 { @JsonProperty("accessVector") private CvssV20 .AccessVectorType accessVector; @JsonProperty("accessComplexity") private CvssV20 .AccessComplexityType accessComplexity; @JsonProperty("authentication") private CvssV20 .AuthenticationType authentication; @JsonProperty("confidentialityImpact") private CvssV20 .CiaType confidentialityImpact; @JsonProperty("integrityImpact") private CvssV20 .CiaType integrityImpact; @JsonProperty("availabilityImpact") private CvssV20 .CiaType availabilityImpact; /** * * (Required) * */ @JsonProperty("baseScore") private Double baseScore; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @JsonProperty("accessVector") public CvssV20 .AccessVectorType getAccessVector() { return accessVector; } @JsonProperty("accessVector") public void setAccessVector(CvssV20 .AccessVectorType accessVector) { this.accessVector = accessVector; } @JsonProperty("accessComplexity") public CvssV20 .AccessComplexityType getAccessComplexity() { return accessComplexity; } @JsonProperty("accessComplexity") public void setAccessComplexity(CvssV20 .AccessComplexityType accessComplexity) { this.accessComplexity = accessComplexity; } @JsonProperty("authentication") public CvssV20 .AuthenticationType getAuthentication() { return authentication; } @JsonProperty("authentication") public void setAuthentication(CvssV20 .AuthenticationType authentication) { this.authentication = authentication; } @JsonProperty("confidentialityImpact") public CvssV20 .CiaType getConfidentialityImpact() { return confidentialityImpact; } @JsonProperty("confidentialityImpact") public void setConfidentialityImpact(CvssV20 .CiaType confidentialityImpact) { this.confidentialityImpact = confidentialityImpact; } @JsonProperty("integrityImpact") public CvssV20 .CiaType getIntegrityImpact() { return integrityImpact; } @JsonProperty("integrityImpact") public void setIntegrityImpact(CvssV20 .CiaType integrityImpact) { this.integrityImpact = integrityImpact; } @JsonProperty("availabilityImpact") public CvssV20 .CiaType getAvailabilityImpact() { return availabilityImpact; } @JsonProperty("availabilityImpact") public void setAvailabilityImpact(CvssV20 .CiaType availabilityImpact) { this.availabilityImpact = availabilityImpact; } /** * * (Required) * */ @JsonProperty("baseScore") public Double getBaseScore() { return baseScore; } /** * * (Required) * */ @JsonProperty("baseScore") public void setBaseScore(Double baseScore) { this.baseScore = baseScore; } @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(CvssV20 .class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("accessVector"); sb.append('='); sb.append(((this.accessVector == null)?"":this.accessVector)); sb.append(','); sb.append("accessComplexity"); sb.append('='); sb.append(((this.accessComplexity == null)?"":this.accessComplexity)); sb.append(','); sb.append("authentication"); sb.append('='); sb.append(((this.authentication == null)?"":this.authentication)); sb.append(','); sb.append("confidentialityImpact"); sb.append('='); sb.append(((this.confidentialityImpact == null)?"":this.confidentialityImpact)); sb.append(','); sb.append("integrityImpact"); sb.append('='); sb.append(((this.integrityImpact == null)?"":this.integrityImpact)); sb.append(','); sb.append("availabilityImpact"); sb.append('='); sb.append(((this.availabilityImpact == null)?"":this.availabilityImpact)); sb.append(','); sb.append("baseScore"); sb.append('='); sb.append(((this.baseScore == null)?"":this.baseScore)); 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.accessComplexity == null)? 0 :this.accessComplexity.hashCode())); result = ((result* 31)+((this.confidentialityImpact == null)? 0 :this.confidentialityImpact.hashCode())); result = ((result* 31)+((this.availabilityImpact == null)? 0 :this.availabilityImpact.hashCode())); result = ((result* 31)+((this.integrityImpact == null)? 0 :this.integrityImpact.hashCode())); result = ((result* 31)+((this.baseScore == null)? 0 :this.baseScore.hashCode())); result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); result = ((result* 31)+((this.accessVector == null)? 0 :this.accessVector.hashCode())); result = ((result* 31)+((this.authentication == null)? 0 :this.authentication.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof CvssV20) == false) { return false; } CvssV20 rhs = ((CvssV20) other); return (((((((((this.accessComplexity == rhs.accessComplexity)||((this.accessComplexity!= null)&&this.accessComplexity.equals(rhs.accessComplexity)))&&((this.confidentialityImpact == rhs.confidentialityImpact)||((this.confidentialityImpact!= null)&&this.confidentialityImpact.equals(rhs.confidentialityImpact))))&&((this.availabilityImpact == rhs.availabilityImpact)||((this.availabilityImpact!= null)&&this.availabilityImpact.equals(rhs.availabilityImpact))))&&((this.integrityImpact == rhs.integrityImpact)||((this.integrityImpact!= null)&&this.integrityImpact.equals(rhs.integrityImpact))))&&((this.baseScore == rhs.baseScore)||((this.baseScore!= null)&&this.baseScore.equals(rhs.baseScore))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.accessVector == rhs.accessVector)||((this.accessVector!= null)&&this.accessVector.equals(rhs.accessVector))))&&((this.authentication == rhs.authentication)||((this.authentication!= null)&&this.authentication.equals(rhs.authentication)))); } @Generated("jsonschema2pojo") public enum AccessComplexityType { HIGH("HIGH"), MEDIUM("MEDIUM"), LOW("LOW"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (CvssV20 .AccessComplexityType c: values()) { CONSTANTS.put(c.value, c); } } AccessComplexityType(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static CvssV20 .AccessComplexityType fromValue(String value) { CvssV20 .AccessComplexityType constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } @Generated("jsonschema2pojo") public enum AccessVectorType { NETWORK("NETWORK"), ADJACENT_NETWORK("ADJACENT_NETWORK"), LOCAL("LOCAL"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (CvssV20 .AccessVectorType c: values()) { CONSTANTS.put(c.value, c); } } AccessVectorType(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static CvssV20 .AccessVectorType fromValue(String value) { CvssV20 .AccessVectorType constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } @Generated("jsonschema2pojo") public enum AuthenticationType { MULTIPLE("MULTIPLE"), SINGLE("SINGLE"), NONE("NONE"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (CvssV20 .AuthenticationType c: values()) { CONSTANTS.put(c.value, c); } } AuthenticationType(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static CvssV20 .AuthenticationType fromValue(String value) { CvssV20 .AuthenticationType constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } @Generated("jsonschema2pojo") public enum CiaType { NONE("NONE"), PARTIAL("PARTIAL"), COMPLETE("COMPLETE"); private final String value; private final static Map CONSTANTS = new HashMap(); static { for (CvssV20 .CiaType c: values()) { CONSTANTS.put(c.value, c); } } CiaType(String value) { this.value = value; } @Override public String toString() { return this.value; } @JsonValue public String value() { return this.value; } @JsonCreator public static CvssV20 .CiaType fromValue(String value) { CvssV20 .CiaType constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy