/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A vulnerability associated with a finding. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Vulnerability implements Serializable, Cloneable, StructuredPojo { /** ** The identifier of the vulnerability. *
*/ private String id; /** ** List of software packages that have the vulnerability. *
*/ private java.util.List* CVSS scores from the advisory related to the vulnerability. *
*/ private java.util.List* List of vulnerabilities that are related to this vulnerability. *
*/ private java.util.List* Information about the vendor that generates the vulnerability report. *
*/ private VulnerabilityVendor vendor; /** ** A list of URLs that provide additional information about the vulnerability. *
*/ private java.util.List
* Specifies if all vulnerable packages in a finding have a value for FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the number of
* vulnerable packages that have a value for both FixedInVersion
and Remediation
. Valid
* values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
* The identifier of the vulnerability. *
* * @param id * The identifier of the vulnerability. */ public void setId(String id) { this.id = id; } /** ** The identifier of the vulnerability. *
* * @return The identifier of the vulnerability. */ public String getId() { return this.id; } /** ** The identifier of the vulnerability. *
* * @param id * The identifier of the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withId(String id) { setId(id); return this; } /** ** List of software packages that have the vulnerability. *
* * @return List of software packages that have the vulnerability. */ public java.util.List* List of software packages that have the vulnerability. *
* * @param vulnerablePackages * List of software packages that have the vulnerability. */ public void setVulnerablePackages(java.util.Collection* List of software packages that have the vulnerability. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setVulnerablePackages(java.util.Collection)} or {@link #withVulnerablePackages(java.util.Collection)} if * you want to override the existing values. *
* * @param vulnerablePackages * List of software packages that have the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withVulnerablePackages(SoftwarePackage... vulnerablePackages) { if (this.vulnerablePackages == null) { setVulnerablePackages(new java.util.ArrayList* List of software packages that have the vulnerability. *
* * @param vulnerablePackages * List of software packages that have the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withVulnerablePackages(java.util.Collection* CVSS scores from the advisory related to the vulnerability. *
* * @return CVSS scores from the advisory related to the vulnerability. */ public java.util.List* CVSS scores from the advisory related to the vulnerability. *
* * @param cvss * CVSS scores from the advisory related to the vulnerability. */ public void setCvss(java.util.Collection* CVSS scores from the advisory related to the vulnerability. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setCvss(java.util.Collection)} or {@link #withCvss(java.util.Collection)} if you want to override the * existing values. *
* * @param cvss * CVSS scores from the advisory related to the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withCvss(Cvss... cvss) { if (this.cvss == null) { setCvss(new java.util.ArrayList* CVSS scores from the advisory related to the vulnerability. *
* * @param cvss * CVSS scores from the advisory related to the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withCvss(java.util.Collection* List of vulnerabilities that are related to this vulnerability. *
* * @return List of vulnerabilities that are related to this vulnerability. */ public java.util.List* List of vulnerabilities that are related to this vulnerability. *
* * @param relatedVulnerabilities * List of vulnerabilities that are related to this vulnerability. */ public void setRelatedVulnerabilities(java.util.Collection* List of vulnerabilities that are related to this vulnerability. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRelatedVulnerabilities(java.util.Collection)} or * {@link #withRelatedVulnerabilities(java.util.Collection)} if you want to override the existing values. *
* * @param relatedVulnerabilities * List of vulnerabilities that are related to this vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withRelatedVulnerabilities(String... relatedVulnerabilities) { if (this.relatedVulnerabilities == null) { setRelatedVulnerabilities(new java.util.ArrayList* List of vulnerabilities that are related to this vulnerability. *
* * @param relatedVulnerabilities * List of vulnerabilities that are related to this vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withRelatedVulnerabilities(java.util.Collection* Information about the vendor that generates the vulnerability report. *
* * @param vendor * Information about the vendor that generates the vulnerability report. */ public void setVendor(VulnerabilityVendor vendor) { this.vendor = vendor; } /** ** Information about the vendor that generates the vulnerability report. *
* * @return Information about the vendor that generates the vulnerability report. */ public VulnerabilityVendor getVendor() { return this.vendor; } /** ** Information about the vendor that generates the vulnerability report. *
* * @param vendor * Information about the vendor that generates the vulnerability report. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withVendor(VulnerabilityVendor vendor) { setVendor(vendor); return this; } /** ** A list of URLs that provide additional information about the vulnerability. *
* * @return A list of URLs that provide additional information about the vulnerability. */ public java.util.List* A list of URLs that provide additional information about the vulnerability. *
* * @param referenceUrls * A list of URLs that provide additional information about the vulnerability. */ public void setReferenceUrls(java.util.Collection* A list of URLs that provide additional information about the vulnerability. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setReferenceUrls(java.util.Collection)} or {@link #withReferenceUrls(java.util.Collection)} if you want * to override the existing values. *
* * @param referenceUrls * A list of URLs that provide additional information about the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withReferenceUrls(String... referenceUrls) { if (this.referenceUrls == null) { setReferenceUrls(new java.util.ArrayList* A list of URLs that provide additional information about the vulnerability. *
* * @param referenceUrls * A list of URLs that provide additional information about the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withReferenceUrls(java.util.Collection
* Specifies if all vulnerable packages in a finding have a value for FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the number of
* vulnerable packages that have a value for both FixedInVersion
and Remediation
. Valid
* values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the
* number of vulnerable packages that have a value for both FixedInVersion
and
* Remediation
. Valid values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
* Specifies if all vulnerable packages in a finding have a value for FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the number of
* vulnerable packages that have a value for both FixedInVersion
and Remediation
. Valid
* values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the
* number of vulnerable packages that have a value for both FixedInVersion
and
* Remediation
. Valid values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
* Specifies if all vulnerable packages in a finding have a value for FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the number of
* vulnerable packages that have a value for both FixedInVersion
and Remediation
. Valid
* values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the
* number of vulnerable packages that have a value for both FixedInVersion
and
* Remediation
. Valid values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
* Specifies if all vulnerable packages in a finding have a value for FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the number of
* vulnerable packages that have a value for both FixedInVersion
and Remediation
. Valid
* values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*
FixedInVersion
and
* Remediation
. This field is evaluated for each vulnerability Id
based on the
* number of vulnerable packages that have a value for both FixedInVersion
and
* Remediation
. Valid values are as follows:
*
* YES
if all vulnerable packages have a value for both FixedInVersion
and
* Remediation
*
* NO
if no vulnerable packages have a value for FixedInVersion
and
* Remediation
*
* PARTIAL
otherwise
*