org.owasp.dependencycheck.data.nvd.json.BaseMetricV3 Maven / Gradle / Ivy
Show all versions of dependency-check-core Show documentation
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.JsonPropertyOrder;
/**
* CVSS V3.x score.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"cvssV3"
})
@Generated("jsonschema2pojo")
public class BaseMetricV3 {
/**
* JSON Schema for Common Vulnerability Scoring System version 3.x
*
*
*
*/
@JsonProperty("cvssV3")
private CvssV3X cvssV3;
@JsonIgnore
private Map additionalProperties = new LinkedHashMap();
/**
* JSON Schema for Common Vulnerability Scoring System version 3.x
*
*
*
*/
@JsonProperty("cvssV3")
public CvssV3X getCvssV3() {
return cvssV3;
}
/**
* JSON Schema for Common Vulnerability Scoring System version 3.x
*
*
*
*/
@JsonProperty("cvssV3")
public void setCvssV3(CvssV3X cvssV3) {
this.cvssV3 = cvssV3;
}
@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(BaseMetricV3 .class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("cvssV3");
sb.append('=');
sb.append(((this.cvssV3 == null)?"":this.cvssV3));
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.cvssV3 == null)? 0 :this.cvssV3 .hashCode()));
result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof BaseMetricV3) == false) {
return false;
}
BaseMetricV3 rhs = ((BaseMetricV3) other);
return (((this.cvssV3 == rhs.cvssV3)||((this.cvssV3 != null)&&this.cvssV3 .equals(rhs.cvssV3)))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))));
}
}