221 lines
13 KiB
C++
221 lines
13 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#pragma once
|
|
#include <aws/ecr/ECR_EXPORTS.h>
|
|
#include <aws/core/utils/memory/stl/AWSVector.h>
|
|
#include <aws/core/utils/memory/stl/AWSString.h>
|
|
#include <aws/core/utils/DateTime.h>
|
|
#include <aws/ecr/model/CvssScore.h>
|
|
#include <aws/ecr/model/VulnerablePackage.h>
|
|
#include <utility>
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Utils
|
|
{
|
|
namespace Json
|
|
{
|
|
class JsonValue;
|
|
class JsonView;
|
|
} // namespace Json
|
|
} // namespace Utils
|
|
namespace ECR
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
/**
|
|
* <p>Information about a package vulnerability finding.</p><p><h3>See Also:</h3>
|
|
* <a
|
|
* href="http://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PackageVulnerabilityDetails">AWS
|
|
* API Reference</a></p>
|
|
*/
|
|
class PackageVulnerabilityDetails
|
|
{
|
|
public:
|
|
AWS_ECR_API PackageVulnerabilityDetails();
|
|
AWS_ECR_API PackageVulnerabilityDetails(Aws::Utils::Json::JsonView jsonValue);
|
|
AWS_ECR_API PackageVulnerabilityDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
|
|
AWS_ECR_API Aws::Utils::Json::JsonValue Jsonize() const;
|
|
|
|
|
|
///@{
|
|
/**
|
|
* <p>An object that contains details about the CVSS score of a finding.</p>
|
|
*/
|
|
inline const Aws::Vector<CvssScore>& GetCvss() const{ return m_cvss; }
|
|
inline bool CvssHasBeenSet() const { return m_cvssHasBeenSet; }
|
|
inline void SetCvss(const Aws::Vector<CvssScore>& value) { m_cvssHasBeenSet = true; m_cvss = value; }
|
|
inline void SetCvss(Aws::Vector<CvssScore>&& value) { m_cvssHasBeenSet = true; m_cvss = std::move(value); }
|
|
inline PackageVulnerabilityDetails& WithCvss(const Aws::Vector<CvssScore>& value) { SetCvss(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithCvss(Aws::Vector<CvssScore>&& value) { SetCvss(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& AddCvss(const CvssScore& value) { m_cvssHasBeenSet = true; m_cvss.push_back(value); return *this; }
|
|
inline PackageVulnerabilityDetails& AddCvss(CvssScore&& value) { m_cvssHasBeenSet = true; m_cvss.push_back(std::move(value)); return *this; }
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>One or more URLs that contain details about this vulnerability type.</p>
|
|
*/
|
|
inline const Aws::Vector<Aws::String>& GetReferenceUrls() const{ return m_referenceUrls; }
|
|
inline bool ReferenceUrlsHasBeenSet() const { return m_referenceUrlsHasBeenSet; }
|
|
inline void SetReferenceUrls(const Aws::Vector<Aws::String>& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls = value; }
|
|
inline void SetReferenceUrls(Aws::Vector<Aws::String>&& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls = std::move(value); }
|
|
inline PackageVulnerabilityDetails& WithReferenceUrls(const Aws::Vector<Aws::String>& value) { SetReferenceUrls(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithReferenceUrls(Aws::Vector<Aws::String>&& value) { SetReferenceUrls(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& AddReferenceUrls(const Aws::String& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(value); return *this; }
|
|
inline PackageVulnerabilityDetails& AddReferenceUrls(Aws::String&& value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(std::move(value)); return *this; }
|
|
inline PackageVulnerabilityDetails& AddReferenceUrls(const char* value) { m_referenceUrlsHasBeenSet = true; m_referenceUrls.push_back(value); return *this; }
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>One or more vulnerabilities related to the one identified in this
|
|
* finding.</p>
|
|
*/
|
|
inline const Aws::Vector<Aws::String>& GetRelatedVulnerabilities() const{ return m_relatedVulnerabilities; }
|
|
inline bool RelatedVulnerabilitiesHasBeenSet() const { return m_relatedVulnerabilitiesHasBeenSet; }
|
|
inline void SetRelatedVulnerabilities(const Aws::Vector<Aws::String>& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities = value; }
|
|
inline void SetRelatedVulnerabilities(Aws::Vector<Aws::String>&& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities = std::move(value); }
|
|
inline PackageVulnerabilityDetails& WithRelatedVulnerabilities(const Aws::Vector<Aws::String>& value) { SetRelatedVulnerabilities(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithRelatedVulnerabilities(Aws::Vector<Aws::String>&& value) { SetRelatedVulnerabilities(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& AddRelatedVulnerabilities(const Aws::String& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities.push_back(value); return *this; }
|
|
inline PackageVulnerabilityDetails& AddRelatedVulnerabilities(Aws::String&& value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities.push_back(std::move(value)); return *this; }
|
|
inline PackageVulnerabilityDetails& AddRelatedVulnerabilities(const char* value) { m_relatedVulnerabilitiesHasBeenSet = true; m_relatedVulnerabilities.push_back(value); return *this; }
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>The source of the vulnerability information.</p>
|
|
*/
|
|
inline const Aws::String& GetSource() const{ return m_source; }
|
|
inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
|
|
inline void SetSource(const Aws::String& value) { m_sourceHasBeenSet = true; m_source = value; }
|
|
inline void SetSource(Aws::String&& value) { m_sourceHasBeenSet = true; m_source = std::move(value); }
|
|
inline void SetSource(const char* value) { m_sourceHasBeenSet = true; m_source.assign(value); }
|
|
inline PackageVulnerabilityDetails& WithSource(const Aws::String& value) { SetSource(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithSource(Aws::String&& value) { SetSource(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& WithSource(const char* value) { SetSource(value); return *this;}
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>A URL to the source of the vulnerability information.</p>
|
|
*/
|
|
inline const Aws::String& GetSourceUrl() const{ return m_sourceUrl; }
|
|
inline bool SourceUrlHasBeenSet() const { return m_sourceUrlHasBeenSet; }
|
|
inline void SetSourceUrl(const Aws::String& value) { m_sourceUrlHasBeenSet = true; m_sourceUrl = value; }
|
|
inline void SetSourceUrl(Aws::String&& value) { m_sourceUrlHasBeenSet = true; m_sourceUrl = std::move(value); }
|
|
inline void SetSourceUrl(const char* value) { m_sourceUrlHasBeenSet = true; m_sourceUrl.assign(value); }
|
|
inline PackageVulnerabilityDetails& WithSourceUrl(const Aws::String& value) { SetSourceUrl(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithSourceUrl(Aws::String&& value) { SetSourceUrl(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& WithSourceUrl(const char* value) { SetSourceUrl(value); return *this;}
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>The date and time that this vulnerability was first added to the vendor's
|
|
* database.</p>
|
|
*/
|
|
inline const Aws::Utils::DateTime& GetVendorCreatedAt() const{ return m_vendorCreatedAt; }
|
|
inline bool VendorCreatedAtHasBeenSet() const { return m_vendorCreatedAtHasBeenSet; }
|
|
inline void SetVendorCreatedAt(const Aws::Utils::DateTime& value) { m_vendorCreatedAtHasBeenSet = true; m_vendorCreatedAt = value; }
|
|
inline void SetVendorCreatedAt(Aws::Utils::DateTime&& value) { m_vendorCreatedAtHasBeenSet = true; m_vendorCreatedAt = std::move(value); }
|
|
inline PackageVulnerabilityDetails& WithVendorCreatedAt(const Aws::Utils::DateTime& value) { SetVendorCreatedAt(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVendorCreatedAt(Aws::Utils::DateTime&& value) { SetVendorCreatedAt(std::move(value)); return *this;}
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>The severity the vendor has given to this vulnerability type.</p>
|
|
*/
|
|
inline const Aws::String& GetVendorSeverity() const{ return m_vendorSeverity; }
|
|
inline bool VendorSeverityHasBeenSet() const { return m_vendorSeverityHasBeenSet; }
|
|
inline void SetVendorSeverity(const Aws::String& value) { m_vendorSeverityHasBeenSet = true; m_vendorSeverity = value; }
|
|
inline void SetVendorSeverity(Aws::String&& value) { m_vendorSeverityHasBeenSet = true; m_vendorSeverity = std::move(value); }
|
|
inline void SetVendorSeverity(const char* value) { m_vendorSeverityHasBeenSet = true; m_vendorSeverity.assign(value); }
|
|
inline PackageVulnerabilityDetails& WithVendorSeverity(const Aws::String& value) { SetVendorSeverity(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVendorSeverity(Aws::String&& value) { SetVendorSeverity(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVendorSeverity(const char* value) { SetVendorSeverity(value); return *this;}
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>The date and time the vendor last updated this vulnerability in their
|
|
* database.</p>
|
|
*/
|
|
inline const Aws::Utils::DateTime& GetVendorUpdatedAt() const{ return m_vendorUpdatedAt; }
|
|
inline bool VendorUpdatedAtHasBeenSet() const { return m_vendorUpdatedAtHasBeenSet; }
|
|
inline void SetVendorUpdatedAt(const Aws::Utils::DateTime& value) { m_vendorUpdatedAtHasBeenSet = true; m_vendorUpdatedAt = value; }
|
|
inline void SetVendorUpdatedAt(Aws::Utils::DateTime&& value) { m_vendorUpdatedAtHasBeenSet = true; m_vendorUpdatedAt = std::move(value); }
|
|
inline PackageVulnerabilityDetails& WithVendorUpdatedAt(const Aws::Utils::DateTime& value) { SetVendorUpdatedAt(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVendorUpdatedAt(Aws::Utils::DateTime&& value) { SetVendorUpdatedAt(std::move(value)); return *this;}
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>The ID given to this vulnerability.</p>
|
|
*/
|
|
inline const Aws::String& GetVulnerabilityId() const{ return m_vulnerabilityId; }
|
|
inline bool VulnerabilityIdHasBeenSet() const { return m_vulnerabilityIdHasBeenSet; }
|
|
inline void SetVulnerabilityId(const Aws::String& value) { m_vulnerabilityIdHasBeenSet = true; m_vulnerabilityId = value; }
|
|
inline void SetVulnerabilityId(Aws::String&& value) { m_vulnerabilityIdHasBeenSet = true; m_vulnerabilityId = std::move(value); }
|
|
inline void SetVulnerabilityId(const char* value) { m_vulnerabilityIdHasBeenSet = true; m_vulnerabilityId.assign(value); }
|
|
inline PackageVulnerabilityDetails& WithVulnerabilityId(const Aws::String& value) { SetVulnerabilityId(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVulnerabilityId(Aws::String&& value) { SetVulnerabilityId(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVulnerabilityId(const char* value) { SetVulnerabilityId(value); return *this;}
|
|
///@}
|
|
|
|
///@{
|
|
/**
|
|
* <p>The packages impacted by this vulnerability.</p>
|
|
*/
|
|
inline const Aws::Vector<VulnerablePackage>& GetVulnerablePackages() const{ return m_vulnerablePackages; }
|
|
inline bool VulnerablePackagesHasBeenSet() const { return m_vulnerablePackagesHasBeenSet; }
|
|
inline void SetVulnerablePackages(const Aws::Vector<VulnerablePackage>& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages = value; }
|
|
inline void SetVulnerablePackages(Aws::Vector<VulnerablePackage>&& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages = std::move(value); }
|
|
inline PackageVulnerabilityDetails& WithVulnerablePackages(const Aws::Vector<VulnerablePackage>& value) { SetVulnerablePackages(value); return *this;}
|
|
inline PackageVulnerabilityDetails& WithVulnerablePackages(Aws::Vector<VulnerablePackage>&& value) { SetVulnerablePackages(std::move(value)); return *this;}
|
|
inline PackageVulnerabilityDetails& AddVulnerablePackages(const VulnerablePackage& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages.push_back(value); return *this; }
|
|
inline PackageVulnerabilityDetails& AddVulnerablePackages(VulnerablePackage&& value) { m_vulnerablePackagesHasBeenSet = true; m_vulnerablePackages.push_back(std::move(value)); return *this; }
|
|
///@}
|
|
private:
|
|
|
|
Aws::Vector<CvssScore> m_cvss;
|
|
bool m_cvssHasBeenSet = false;
|
|
|
|
Aws::Vector<Aws::String> m_referenceUrls;
|
|
bool m_referenceUrlsHasBeenSet = false;
|
|
|
|
Aws::Vector<Aws::String> m_relatedVulnerabilities;
|
|
bool m_relatedVulnerabilitiesHasBeenSet = false;
|
|
|
|
Aws::String m_source;
|
|
bool m_sourceHasBeenSet = false;
|
|
|
|
Aws::String m_sourceUrl;
|
|
bool m_sourceUrlHasBeenSet = false;
|
|
|
|
Aws::Utils::DateTime m_vendorCreatedAt;
|
|
bool m_vendorCreatedAtHasBeenSet = false;
|
|
|
|
Aws::String m_vendorSeverity;
|
|
bool m_vendorSeverityHasBeenSet = false;
|
|
|
|
Aws::Utils::DateTime m_vendorUpdatedAt;
|
|
bool m_vendorUpdatedAtHasBeenSet = false;
|
|
|
|
Aws::String m_vulnerabilityId;
|
|
bool m_vulnerabilityIdHasBeenSet = false;
|
|
|
|
Aws::Vector<VulnerablePackage> m_vulnerablePackages;
|
|
bool m_vulnerablePackagesHasBeenSet = false;
|
|
};
|
|
|
|
} // namespace Model
|
|
} // namespace ECR
|
|
} // namespace Aws
|