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

io.github.algomaster99.terminator.commons.cyclonedx.ComponentEvidence Maven / Gradle / Ivy


package io.github.algomaster99.terminator.commons.cyclonedx;

import java.util.ArrayList;
import java.util.List;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * Evidence
 * 

* Provides the ability to document evidence collected through various forms of extraction or analysis. * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "identity", "occurrences", "callstack", "licenses", "copyright" }) @Generated("jsonschema2pojo") public class ComponentEvidence { /** * Evidence that substantiates the identity of a component. * */ @JsonProperty("identity") @JsonPropertyDescription("Evidence that substantiates the identity of a component.") private Identity identity; /** * Occurrences *

* Evidence of individual instances of a component spread across multiple locations. * */ @JsonProperty("occurrences") @JsonPropertyDescription("Evidence of individual instances of a component spread across multiple locations.") private List occurrences = new ArrayList(); /** * Evidence of the components use through the callstack. * */ @JsonProperty("callstack") @JsonPropertyDescription("Evidence of the components use through the callstack.") private Callstack callstack; /** * License Choice *

* EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression) * */ @JsonProperty("licenses") @JsonPropertyDescription("EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression)") private List licenses = new ArrayList(); /** * Copyright *

* * */ @JsonProperty("copyright") private List copyright = new ArrayList(); /** * Evidence that substantiates the identity of a component. * */ @JsonProperty("identity") public Identity getIdentity() { return identity; } /** * Evidence that substantiates the identity of a component. * */ @JsonProperty("identity") public void setIdentity(Identity identity) { this.identity = identity; } /** * Occurrences *

* Evidence of individual instances of a component spread across multiple locations. * */ @JsonProperty("occurrences") public List getOccurrences() { return occurrences; } /** * Occurrences *

* Evidence of individual instances of a component spread across multiple locations. * */ @JsonProperty("occurrences") public void setOccurrences(List occurrences) { this.occurrences = occurrences; } /** * Evidence of the components use through the callstack. * */ @JsonProperty("callstack") public Callstack getCallstack() { return callstack; } /** * Evidence of the components use through the callstack. * */ @JsonProperty("callstack") public void setCallstack(Callstack callstack) { this.callstack = callstack; } /** * License Choice *

* EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression) * */ @JsonProperty("licenses") public List getLicenses() { return licenses; } /** * License Choice *

* EITHER (list of SPDX licenses and/or named licenses) OR (tuple of one SPDX License Expression) * */ @JsonProperty("licenses") public void setLicenses(List licenses) { this.licenses = licenses; } /** * Copyright *

* * */ @JsonProperty("copyright") public List getCopyright() { return copyright; } /** * Copyright *

* * */ @JsonProperty("copyright") public void setCopyright(List copyright) { this.copyright = copyright; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(ComponentEvidence.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("identity"); sb.append('='); sb.append(((this.identity == null)?"":this.identity)); sb.append(','); sb.append("occurrences"); sb.append('='); sb.append(((this.occurrences == null)?"":this.occurrences)); sb.append(','); sb.append("callstack"); sb.append('='); sb.append(((this.callstack == null)?"":this.callstack)); sb.append(','); sb.append("licenses"); sb.append('='); sb.append(((this.licenses == null)?"":this.licenses)); sb.append(','); sb.append("copyright"); sb.append('='); sb.append(((this.copyright == null)?"":this.copyright)); 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.occurrences == null)? 0 :this.occurrences.hashCode())); result = ((result* 31)+((this.callstack == null)? 0 :this.callstack.hashCode())); result = ((result* 31)+((this.licenses == null)? 0 :this.licenses.hashCode())); result = ((result* 31)+((this.copyright == null)? 0 :this.copyright.hashCode())); result = ((result* 31)+((this.identity == null)? 0 :this.identity.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof ComponentEvidence) == false) { return false; } ComponentEvidence rhs = ((ComponentEvidence) other); return ((((((this.occurrences == rhs.occurrences)||((this.occurrences!= null)&&this.occurrences.equals(rhs.occurrences)))&&((this.callstack == rhs.callstack)||((this.callstack!= null)&&this.callstack.equals(rhs.callstack))))&&((this.licenses == rhs.licenses)||((this.licenses!= null)&&this.licenses.equals(rhs.licenses))))&&((this.copyright == rhs.copyright)||((this.copyright!= null)&&this.copyright.equals(rhs.copyright))))&&((this.identity == rhs.identity)||((this.identity!= null)&&this.identity.equals(rhs.identity)))); } }