/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

A vulnerability associated with a finding.

See Also:

AWS * API Reference

*/ class Vulnerability { public: AWS_SECURITYHUB_API Vulnerability(); AWS_SECURITYHUB_API Vulnerability(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Vulnerability& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The identifier of the vulnerability.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The identifier of the vulnerability.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The identifier of the vulnerability.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The identifier of the vulnerability.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The identifier of the vulnerability.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The identifier of the vulnerability.

*/ inline Vulnerability& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The identifier of the vulnerability.

*/ inline Vulnerability& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The identifier of the vulnerability.

*/ inline Vulnerability& WithId(const char* value) { SetId(value); return *this;} /** *

List of software packages that have the vulnerability.

*/ inline const Aws::Vector& GetVulnerablePackages() const{ return m_vulnerablePackages; } /** *

List of software packages that have the vulnerability.

*/ inline bool VulnerablePackagesHasBeenSet() const { return m_vulnerablePackagesHasBeenSet; } /** *

List of software packages that have the vulnerability.

*/ inline void SetVulnerablePackages(const Aws::Vector& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages = value; } /** *

List of software packages that have the vulnerability.

*/ inline void SetVulnerablePackages(Aws::Vector&& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages = std::move(value); } /** *

List of software packages that have the vulnerability.

*/ inline Vulnerability& WithVulnerablePackages(const Aws::Vector& value) { SetVulnerablePackages(value); return *this;} /** *

List of software packages that have the vulnerability.

*/ inline Vulnerability& WithVulnerablePackages(Aws::Vector&& value) { SetVulnerablePackages(std::move(value)); return *this;} /** *

List of software packages that have the vulnerability.

*/ inline Vulnerability& AddVulnerablePackages(const SoftwarePackage& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages.push_back(value); return *this; } /** *

List of software packages that have the vulnerability.

*/ inline Vulnerability& AddVulnerablePackages(SoftwarePackage&& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages.push_back(std::move(value)); return *this; } /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline const Aws::Vector& GetCvss() const{ return m_cvss; } /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline bool CvssHasBeenSet() const { return m_cvssHasBeenSet; } /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline void SetCvss(const Aws::Vector& value) { m_cvssHasBeenSet = true; m_cvss = value; } /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline void SetCvss(Aws::Vector&& value) { m_cvssHasBeenSet = true; m_cvss = std::move(value); } /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline Vulnerability& WithCvss(const Aws::Vector& value) { SetCvss(value); return *this;} /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline Vulnerability& WithCvss(Aws::Vector&& value) { SetCvss(std::move(value)); return *this;} /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline Vulnerability& AddCvss(const Cvss& value) { m_cvssHasBeenSet = true; m_cvss.push_back(value); return *this; } /** *

CVSS scores from the advisory related to the vulnerability.

*/ inline Vulnerability& AddCvss(Cvss&& value) { m_cvssHasBeenSet = true; m_cvss.push_back(std::move(value)); return *this; } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline const Aws::Vector& GetRelatedVulnerabilities() const{ return m_relatedVulnerabilities; } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline bool RelatedVulnerabilitiesHasBeenSet() const { return m_relatedVulnerabilitiesHasBeenSet; } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline void SetRelatedVulnerabilities(const Aws::Vector& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities = value; } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline void SetRelatedVulnerabilities(Aws::Vector&& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities = std::move(value); } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline Vulnerability& WithRelatedVulnerabilities(const Aws::Vector& value) { SetRelatedVulnerabilities(value); return *this;} /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline Vulnerability& WithRelatedVulnerabilities(Aws::Vector&& value) { SetRelatedVulnerabilities(std::move(value)); return *this;} /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline Vulnerability& AddRelatedVulnerabilities(const Aws::String& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities.push_back(value); return *this; } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline Vulnerability& AddRelatedVulnerabilities(Aws::String&& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities.push_back(std::move(value)); return *this; } /** *

List of vulnerabilities that are related to this vulnerability.

*/ inline Vulnerability& AddRelatedVulnerabilities(const char* value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities.push_back(value); return *this; } /** *

Information about the vendor that generates the vulnerability report.

*/ inline const VulnerabilityVendor& GetVendor() const{ return m_vendor; } /** *

Information about the vendor that generates the vulnerability report.

*/ inline bool VendorHasBeenSet() const { return m_vendorHasBeenSet; } /** *

Information about the vendor that generates the vulnerability report.

*/ inline void SetVendor(const VulnerabilityVendor& value) { m_vendorHasBeenSet = true; m_vendor = value; } /** *

Information about the vendor that generates the vulnerability report.

*/ inline void SetVendor(VulnerabilityVendor&& value) { m_vendorHasBeenSet = true; m_vendor = std::move(value); } /** *

Information about the vendor that generates the vulnerability report.

*/ inline Vulnerability& WithVendor(const VulnerabilityVendor& value) { SetVendor(value); return *this;} /** *

Information about the vendor that generates the vulnerability report.

*/ inline Vulnerability& WithVendor(VulnerabilityVendor&& value) { SetVendor(std::move(value)); return *this;} /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline const Aws::Vector& GetReferenceUrls() const{ return m_referenceUrls; } /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline bool ReferenceUrlsHasBeenSet() const { return m_referenceUrlsHasBeenSet; } /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline void SetReferenceUrls(const Aws::Vector& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls = value; } /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline void SetReferenceUrls(Aws::Vector&& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls = std::move(value); } /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline Vulnerability& WithReferenceUrls(const Aws::Vector& value) { SetReferenceUrls(value); return *this;} /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline Vulnerability& WithReferenceUrls(Aws::Vector&& value) { SetReferenceUrls(std::move(value)); return *this;} /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline Vulnerability& AddReferenceUrls(const Aws::String& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(value); return *this; } /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline Vulnerability& AddReferenceUrls(Aws::String&& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(std::move(value)); return *this; } /** *

A list of URLs that provide additional information about the * vulnerability.

*/ inline Vulnerability& AddReferenceUrls(const char* value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(value); return *this; } /** *

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

*/ inline const VulnerabilityFixAvailable& GetFixAvailable() const{ return m_fixAvailable; } /** *

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

*/ inline bool FixAvailableHasBeenSet() const { return m_fixAvailableHasBeenSet; } /** *

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

*/ inline void SetFixAvailable(const VulnerabilityFixAvailable& value) { m_fixAvailableHasBeenSet = true; m_fixAvailable = value; } /** *

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

*/ inline void SetFixAvailable(VulnerabilityFixAvailable&& value) { m_fixAvailableHasBeenSet = true; m_fixAvailable = std::move(value); } /** *

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

*/ inline Vulnerability& WithFixAvailable(const VulnerabilityFixAvailable& value) { SetFixAvailable(value); return *this;} /** *

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

*/ inline Vulnerability& WithFixAvailable(VulnerabilityFixAvailable&& value) { SetFixAvailable(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet = false; Aws::Vector m_vulnerablePackages; bool m_vulnerablePackagesHasBeenSet = false; Aws::Vector m_cvss; bool m_cvssHasBeenSet = false; Aws::Vector m_relatedVulnerabilities; bool m_relatedVulnerabilitiesHasBeenSet = false; VulnerabilityVendor m_vendor; bool m_vendorHasBeenSet = false; Aws::Vector m_referenceUrls; bool m_referenceUrlsHasBeenSet = false; VulnerabilityFixAvailable m_fixAvailable; bool m_fixAvailableHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws