com.oracle.bmc.adm.model.ApplicationDependencyVulnerabilitySummary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of oci-java-sdk-adm Show documentation
Show all versions of oci-java-sdk-adm Show documentation
This project contains the SDK used for Oracle Cloud Infrastructure Adm
The newest version!
/**
* Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved.
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
*/
package com.oracle.bmc.adm.model;
/**
* An application dependency Vulnerability represents a single dependency in the application. An
* application dependency Vulnerability can be associated with eventual Vulnerabilities. Each
* application dependency is uniquely defined by a nodeId and lists eventual dependencies on which
* it depends.
* Note: Objects should always be created or deserialized using the {@link Builder}. This model
* distinguishes fields that are {@code null} because they are unset from fields that are explicitly
* set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a
* set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link
* #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set
* fields into account. The constructor, on the other hand, does not take the explicitly set fields
* into account (since the constructor cannot distinguish explicit {@code null} from unset {@code
* null}).
*/
@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20220421")
@com.fasterxml.jackson.databind.annotation.JsonDeserialize(
builder = ApplicationDependencyVulnerabilitySummary.Builder.class)
@com.fasterxml.jackson.annotation.JsonFilter(
com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME)
public final class ApplicationDependencyVulnerabilitySummary
extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel {
@Deprecated
@java.beans.ConstructorProperties({
"gav",
"purl",
"nodeId",
"applicationDependencyNodeIds",
"vulnerabilities",
"isFoundInKnowledgeBase"
})
public ApplicationDependencyVulnerabilitySummary(
String gav,
String purl,
String nodeId,
java.util.List applicationDependencyNodeIds,
java.util.List vulnerabilities,
Boolean isFoundInKnowledgeBase) {
super();
this.gav = gav;
this.purl = purl;
this.nodeId = nodeId;
this.applicationDependencyNodeIds = applicationDependencyNodeIds;
this.vulnerabilities = vulnerabilities;
this.isFoundInKnowledgeBase = isFoundInKnowledgeBase;
}
@com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "")
public static class Builder {
/**
* Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example:
* org.graalvm.nativeimage:svm:21.1.0. "N/A" for non-maven artifacts.
*/
@com.fasterxml.jackson.annotation.JsonProperty("gav")
private String gav;
/**
* Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example:
* org.graalvm.nativeimage:svm:21.1.0. "N/A" for non-maven artifacts.
*
* @param gav the value to set
* @return this builder
*/
public Builder gav(String gav) {
this.gav = gav;
this.__explicitlySet__.add("gav");
return this;
}
/**
* Package URL defined in https://github.com/package-url/purl-spec, e.g.
* pkg:maven/org.graalvm.nativeimage/[email protected]
*/
@com.fasterxml.jackson.annotation.JsonProperty("purl")
private String purl;
/**
* Package URL defined in https://github.com/package-url/purl-spec, e.g.
* pkg:maven/org.graalvm.nativeimage/[email protected]
*
* @param purl the value to set
* @return this builder
*/
public Builder purl(String purl) {
this.purl = purl;
this.__explicitlySet__.add("purl");
return this;
}
/** Unique identifier of an application dependency, for example nodeId1. */
@com.fasterxml.jackson.annotation.JsonProperty("nodeId")
private String nodeId;
/**
* Unique identifier of an application dependency, for example nodeId1.
*
* @param nodeId the value to set
* @return this builder
*/
public Builder nodeId(String nodeId) {
this.nodeId = nodeId;
this.__explicitlySet__.add("nodeId");
return this;
}
/**
* List of application dependencies on which this application dependency depends, each
* identified by its nodeId.
*/
@com.fasterxml.jackson.annotation.JsonProperty("applicationDependencyNodeIds")
private java.util.List applicationDependencyNodeIds;
/**
* List of application dependencies on which this application dependency depends, each
* identified by its nodeId.
*
* @param applicationDependencyNodeIds the value to set
* @return this builder
*/
public Builder applicationDependencyNodeIds(
java.util.List applicationDependencyNodeIds) {
this.applicationDependencyNodeIds = applicationDependencyNodeIds;
this.__explicitlySet__.add("applicationDependencyNodeIds");
return this;
}
/** List of vulnerabilities for the application dependency. */
@com.fasterxml.jackson.annotation.JsonProperty("vulnerabilities")
private java.util.List vulnerabilities;
/**
* List of vulnerabilities for the application dependency.
*
* @param vulnerabilities the value to set
* @return this builder
*/
public Builder vulnerabilities(java.util.List vulnerabilities) {
this.vulnerabilities = vulnerabilities;
this.__explicitlySet__.add("vulnerabilities");
return this;
}
/** Indicates if the artifact is found in the knowledge base. */
@com.fasterxml.jackson.annotation.JsonProperty("isFoundInKnowledgeBase")
private Boolean isFoundInKnowledgeBase;
/**
* Indicates if the artifact is found in the knowledge base.
*
* @param isFoundInKnowledgeBase the value to set
* @return this builder
*/
public Builder isFoundInKnowledgeBase(Boolean isFoundInKnowledgeBase) {
this.isFoundInKnowledgeBase = isFoundInKnowledgeBase;
this.__explicitlySet__.add("isFoundInKnowledgeBase");
return this;
}
@com.fasterxml.jackson.annotation.JsonIgnore
private final java.util.Set __explicitlySet__ = new java.util.HashSet();
public ApplicationDependencyVulnerabilitySummary build() {
ApplicationDependencyVulnerabilitySummary model =
new ApplicationDependencyVulnerabilitySummary(
this.gav,
this.purl,
this.nodeId,
this.applicationDependencyNodeIds,
this.vulnerabilities,
this.isFoundInKnowledgeBase);
for (String explicitlySetProperty : this.__explicitlySet__) {
model.markPropertyAsExplicitlySet(explicitlySetProperty);
}
return model;
}
@com.fasterxml.jackson.annotation.JsonIgnore
public Builder copy(ApplicationDependencyVulnerabilitySummary model) {
if (model.wasPropertyExplicitlySet("gav")) {
this.gav(model.getGav());
}
if (model.wasPropertyExplicitlySet("purl")) {
this.purl(model.getPurl());
}
if (model.wasPropertyExplicitlySet("nodeId")) {
this.nodeId(model.getNodeId());
}
if (model.wasPropertyExplicitlySet("applicationDependencyNodeIds")) {
this.applicationDependencyNodeIds(model.getApplicationDependencyNodeIds());
}
if (model.wasPropertyExplicitlySet("vulnerabilities")) {
this.vulnerabilities(model.getVulnerabilities());
}
if (model.wasPropertyExplicitlySet("isFoundInKnowledgeBase")) {
this.isFoundInKnowledgeBase(model.getIsFoundInKnowledgeBase());
}
return this;
}
}
/** Create a new builder. */
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().copy(this);
}
/**
* Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example:
* org.graalvm.nativeimage:svm:21.1.0. "N/A" for non-maven artifacts.
*/
@com.fasterxml.jackson.annotation.JsonProperty("gav")
private final String gav;
/**
* Group Artifact Version (GAV) identifier (Group:Artifact:Version). Example:
* org.graalvm.nativeimage:svm:21.1.0. "N/A" for non-maven artifacts.
*
* @return the value
*/
public String getGav() {
return gav;
}
/**
* Package URL defined in https://github.com/package-url/purl-spec, e.g.
* pkg:maven/org.graalvm.nativeimage/[email protected]
*/
@com.fasterxml.jackson.annotation.JsonProperty("purl")
private final String purl;
/**
* Package URL defined in https://github.com/package-url/purl-spec, e.g.
* pkg:maven/org.graalvm.nativeimage/[email protected]
*
* @return the value
*/
public String getPurl() {
return purl;
}
/** Unique identifier of an application dependency, for example nodeId1. */
@com.fasterxml.jackson.annotation.JsonProperty("nodeId")
private final String nodeId;
/**
* Unique identifier of an application dependency, for example nodeId1.
*
* @return the value
*/
public String getNodeId() {
return nodeId;
}
/**
* List of application dependencies on which this application dependency depends, each
* identified by its nodeId.
*/
@com.fasterxml.jackson.annotation.JsonProperty("applicationDependencyNodeIds")
private final java.util.List applicationDependencyNodeIds;
/**
* List of application dependencies on which this application dependency depends, each
* identified by its nodeId.
*
* @return the value
*/
public java.util.List getApplicationDependencyNodeIds() {
return applicationDependencyNodeIds;
}
/** List of vulnerabilities for the application dependency. */
@com.fasterxml.jackson.annotation.JsonProperty("vulnerabilities")
private final java.util.List vulnerabilities;
/**
* List of vulnerabilities for the application dependency.
*
* @return the value
*/
public java.util.List getVulnerabilities() {
return vulnerabilities;
}
/** Indicates if the artifact is found in the knowledge base. */
@com.fasterxml.jackson.annotation.JsonProperty("isFoundInKnowledgeBase")
private final Boolean isFoundInKnowledgeBase;
/**
* Indicates if the artifact is found in the knowledge base.
*
* @return the value
*/
public Boolean getIsFoundInKnowledgeBase() {
return isFoundInKnowledgeBase;
}
@Override
public String toString() {
return this.toString(true);
}
/**
* Return a string representation of the object.
*
* @param includeByteArrayContents true to include the full contents of byte arrays
* @return string representation
*/
public String toString(boolean includeByteArrayContents) {
java.lang.StringBuilder sb = new java.lang.StringBuilder();
sb.append("ApplicationDependencyVulnerabilitySummary(");
sb.append("super=").append(super.toString());
sb.append("gav=").append(String.valueOf(this.gav));
sb.append(", purl=").append(String.valueOf(this.purl));
sb.append(", nodeId=").append(String.valueOf(this.nodeId));
sb.append(", applicationDependencyNodeIds=")
.append(String.valueOf(this.applicationDependencyNodeIds));
sb.append(", vulnerabilities=").append(String.valueOf(this.vulnerabilities));
sb.append(", isFoundInKnowledgeBase=").append(String.valueOf(this.isFoundInKnowledgeBase));
sb.append(")");
return sb.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ApplicationDependencyVulnerabilitySummary)) {
return false;
}
ApplicationDependencyVulnerabilitySummary other =
(ApplicationDependencyVulnerabilitySummary) o;
return java.util.Objects.equals(this.gav, other.gav)
&& java.util.Objects.equals(this.purl, other.purl)
&& java.util.Objects.equals(this.nodeId, other.nodeId)
&& java.util.Objects.equals(
this.applicationDependencyNodeIds, other.applicationDependencyNodeIds)
&& java.util.Objects.equals(this.vulnerabilities, other.vulnerabilities)
&& java.util.Objects.equals(
this.isFoundInKnowledgeBase, other.isFoundInKnowledgeBase)
&& super.equals(other);
}
@Override
public int hashCode() {
final int PRIME = 59;
int result = 1;
result = (result * PRIME) + (this.gav == null ? 43 : this.gav.hashCode());
result = (result * PRIME) + (this.purl == null ? 43 : this.purl.hashCode());
result = (result * PRIME) + (this.nodeId == null ? 43 : this.nodeId.hashCode());
result =
(result * PRIME)
+ (this.applicationDependencyNodeIds == null
? 43
: this.applicationDependencyNodeIds.hashCode());
result =
(result * PRIME)
+ (this.vulnerabilities == null ? 43 : this.vulnerabilities.hashCode());
result =
(result * PRIME)
+ (this.isFoundInKnowledgeBase == null
? 43
: this.isFoundInKnowledgeBase.hashCode());
result = (result * PRIME) + super.hashCode();
return result;
}
}