AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
Vulnerability.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/securityhub/SecurityHub_EXPORTS.h>
10#include <aws/securityhub/model/Cvss.h>
11#include <aws/securityhub/model/SoftwarePackage.h>
12#include <aws/securityhub/model/VulnerabilityCodeVulnerabilities.h>
13#include <aws/securityhub/model/VulnerabilityExploitAvailable.h>
14#include <aws/securityhub/model/VulnerabilityFixAvailable.h>
15#include <aws/securityhub/model/VulnerabilityVendor.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace SecurityHub {
27namespace Model {
28
35 public:
36 AWS_SECURITYHUB_API Vulnerability() = default;
37 AWS_SECURITYHUB_API Vulnerability(Aws::Utils::Json::JsonView jsonValue);
38 AWS_SECURITYHUB_API Vulnerability& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetId() const { return m_id; }
46 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
47 template <typename IdT = Aws::String>
48 void SetId(IdT&& value) {
49 m_idHasBeenSet = true;
50 m_id = std::forward<IdT>(value);
51 }
52 template <typename IdT = Aws::String>
53 Vulnerability& WithId(IdT&& value) {
54 SetId(std::forward<IdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::Vector<SoftwarePackage>& GetVulnerablePackages() const { return m_vulnerablePackages; }
64 inline bool VulnerablePackagesHasBeenSet() const { return m_vulnerablePackagesHasBeenSet; }
65 template <typename VulnerablePackagesT = Aws::Vector<SoftwarePackage>>
66 void SetVulnerablePackages(VulnerablePackagesT&& value) {
67 m_vulnerablePackagesHasBeenSet = true;
68 m_vulnerablePackages = std::forward<VulnerablePackagesT>(value);
69 }
70 template <typename VulnerablePackagesT = Aws::Vector<SoftwarePackage>>
71 Vulnerability& WithVulnerablePackages(VulnerablePackagesT&& value) {
72 SetVulnerablePackages(std::forward<VulnerablePackagesT>(value));
73 return *this;
74 }
75 template <typename VulnerablePackagesT = SoftwarePackage>
76 Vulnerability& AddVulnerablePackages(VulnerablePackagesT&& value) {
77 m_vulnerablePackagesHasBeenSet = true;
78 m_vulnerablePackages.emplace_back(std::forward<VulnerablePackagesT>(value));
79 return *this;
80 }
82
84
87 inline const Aws::Vector<Cvss>& GetCvss() const { return m_cvss; }
88 inline bool CvssHasBeenSet() const { return m_cvssHasBeenSet; }
89 template <typename CvssT = Aws::Vector<Cvss>>
90 void SetCvss(CvssT&& value) {
91 m_cvssHasBeenSet = true;
92 m_cvss = std::forward<CvssT>(value);
93 }
94 template <typename CvssT = Aws::Vector<Cvss>>
95 Vulnerability& WithCvss(CvssT&& value) {
96 SetCvss(std::forward<CvssT>(value));
97 return *this;
98 }
99 template <typename CvssT = Cvss>
100 Vulnerability& AddCvss(CvssT&& value) {
101 m_cvssHasBeenSet = true;
102 m_cvss.emplace_back(std::forward<CvssT>(value));
103 return *this;
104 }
106
108
111 inline const Aws::Vector<Aws::String>& GetRelatedVulnerabilities() const { return m_relatedVulnerabilities; }
112 inline bool RelatedVulnerabilitiesHasBeenSet() const { return m_relatedVulnerabilitiesHasBeenSet; }
113 template <typename RelatedVulnerabilitiesT = Aws::Vector<Aws::String>>
114 void SetRelatedVulnerabilities(RelatedVulnerabilitiesT&& value) {
115 m_relatedVulnerabilitiesHasBeenSet = true;
116 m_relatedVulnerabilities = std::forward<RelatedVulnerabilitiesT>(value);
117 }
118 template <typename RelatedVulnerabilitiesT = Aws::Vector<Aws::String>>
119 Vulnerability& WithRelatedVulnerabilities(RelatedVulnerabilitiesT&& value) {
120 SetRelatedVulnerabilities(std::forward<RelatedVulnerabilitiesT>(value));
121 return *this;
122 }
123 template <typename RelatedVulnerabilitiesT = Aws::String>
124 Vulnerability& AddRelatedVulnerabilities(RelatedVulnerabilitiesT&& value) {
125 m_relatedVulnerabilitiesHasBeenSet = true;
126 m_relatedVulnerabilities.emplace_back(std::forward<RelatedVulnerabilitiesT>(value));
127 return *this;
128 }
130
132
135 inline const VulnerabilityVendor& GetVendor() const { return m_vendor; }
136 inline bool VendorHasBeenSet() const { return m_vendorHasBeenSet; }
137 template <typename VendorT = VulnerabilityVendor>
138 void SetVendor(VendorT&& value) {
139 m_vendorHasBeenSet = true;
140 m_vendor = std::forward<VendorT>(value);
141 }
142 template <typename VendorT = VulnerabilityVendor>
143 Vulnerability& WithVendor(VendorT&& value) {
144 SetVendor(std::forward<VendorT>(value));
145 return *this;
146 }
148
150
154 inline const Aws::Vector<Aws::String>& GetReferenceUrls() const { return m_referenceUrls; }
155 inline bool ReferenceUrlsHasBeenSet() const { return m_referenceUrlsHasBeenSet; }
156 template <typename ReferenceUrlsT = Aws::Vector<Aws::String>>
157 void SetReferenceUrls(ReferenceUrlsT&& value) {
158 m_referenceUrlsHasBeenSet = true;
159 m_referenceUrls = std::forward<ReferenceUrlsT>(value);
160 }
161 template <typename ReferenceUrlsT = Aws::Vector<Aws::String>>
162 Vulnerability& WithReferenceUrls(ReferenceUrlsT&& value) {
163 SetReferenceUrls(std::forward<ReferenceUrlsT>(value));
164 return *this;
165 }
166 template <typename ReferenceUrlsT = Aws::String>
167 Vulnerability& AddReferenceUrls(ReferenceUrlsT&& value) {
168 m_referenceUrlsHasBeenSet = true;
169 m_referenceUrls.emplace_back(std::forward<ReferenceUrlsT>(value));
170 return *this;
171 }
173
175
187 inline VulnerabilityFixAvailable GetFixAvailable() const { return m_fixAvailable; }
188 inline bool FixAvailableHasBeenSet() const { return m_fixAvailableHasBeenSet; }
190 m_fixAvailableHasBeenSet = true;
191 m_fixAvailable = value;
192 }
194 SetFixAvailable(value);
195 return *this;
196 }
198
200
203 inline double GetEpssScore() const { return m_epssScore; }
204 inline bool EpssScoreHasBeenSet() const { return m_epssScoreHasBeenSet; }
205 inline void SetEpssScore(double value) {
206 m_epssScoreHasBeenSet = true;
207 m_epssScore = value;
208 }
209 inline Vulnerability& WithEpssScore(double value) {
210 SetEpssScore(value);
211 return *this;
212 }
214
216
219 inline VulnerabilityExploitAvailable GetExploitAvailable() const { return m_exploitAvailable; }
220 inline bool ExploitAvailableHasBeenSet() const { return m_exploitAvailableHasBeenSet; }
222 m_exploitAvailableHasBeenSet = true;
223 m_exploitAvailable = value;
224 }
226 SetExploitAvailable(value);
227 return *this;
228 }
230
232
236 inline const Aws::String& GetLastKnownExploitAt() const { return m_lastKnownExploitAt; }
237 inline bool LastKnownExploitAtHasBeenSet() const { return m_lastKnownExploitAtHasBeenSet; }
238 template <typename LastKnownExploitAtT = Aws::String>
239 void SetLastKnownExploitAt(LastKnownExploitAtT&& value) {
240 m_lastKnownExploitAtHasBeenSet = true;
241 m_lastKnownExploitAt = std::forward<LastKnownExploitAtT>(value);
242 }
243 template <typename LastKnownExploitAtT = Aws::String>
244 Vulnerability& WithLastKnownExploitAt(LastKnownExploitAtT&& value) {
245 SetLastKnownExploitAt(std::forward<LastKnownExploitAtT>(value));
246 return *this;
247 }
249
251
255 inline const Aws::Vector<VulnerabilityCodeVulnerabilities>& GetCodeVulnerabilities() const { return m_codeVulnerabilities; }
256 inline bool CodeVulnerabilitiesHasBeenSet() const { return m_codeVulnerabilitiesHasBeenSet; }
257 template <typename CodeVulnerabilitiesT = Aws::Vector<VulnerabilityCodeVulnerabilities>>
258 void SetCodeVulnerabilities(CodeVulnerabilitiesT&& value) {
259 m_codeVulnerabilitiesHasBeenSet = true;
260 m_codeVulnerabilities = std::forward<CodeVulnerabilitiesT>(value);
261 }
262 template <typename CodeVulnerabilitiesT = Aws::Vector<VulnerabilityCodeVulnerabilities>>
263 Vulnerability& WithCodeVulnerabilities(CodeVulnerabilitiesT&& value) {
264 SetCodeVulnerabilities(std::forward<CodeVulnerabilitiesT>(value));
265 return *this;
266 }
267 template <typename CodeVulnerabilitiesT = VulnerabilityCodeVulnerabilities>
268 Vulnerability& AddCodeVulnerabilities(CodeVulnerabilitiesT&& value) {
269 m_codeVulnerabilitiesHasBeenSet = true;
270 m_codeVulnerabilities.emplace_back(std::forward<CodeVulnerabilitiesT>(value));
271 return *this;
272 }
274 private:
275 Aws::String m_id;
276
277 Aws::Vector<SoftwarePackage> m_vulnerablePackages;
278
279 Aws::Vector<Cvss> m_cvss;
280
281 Aws::Vector<Aws::String> m_relatedVulnerabilities;
282
283 VulnerabilityVendor m_vendor;
284
285 Aws::Vector<Aws::String> m_referenceUrls;
286
288
289 double m_epssScore{0.0};
290
292
293 Aws::String m_lastKnownExploitAt;
294
296 bool m_idHasBeenSet = false;
297 bool m_vulnerablePackagesHasBeenSet = false;
298 bool m_cvssHasBeenSet = false;
299 bool m_relatedVulnerabilitiesHasBeenSet = false;
300 bool m_vendorHasBeenSet = false;
301 bool m_referenceUrlsHasBeenSet = false;
302 bool m_fixAvailableHasBeenSet = false;
303 bool m_epssScoreHasBeenSet = false;
304 bool m_exploitAvailableHasBeenSet = false;
305 bool m_lastKnownExploitAtHasBeenSet = false;
306 bool m_codeVulnerabilitiesHasBeenSet = false;
307};
308
309} // namespace Model
310} // namespace SecurityHub
311} // namespace Aws
Vulnerability & AddCodeVulnerabilities(CodeVulnerabilitiesT &&value)
AWS_SECURITYHUB_API Vulnerability(Aws::Utils::Json::JsonView jsonValue)
Vulnerability & WithId(IdT &&value)
Vulnerability & WithFixAvailable(VulnerabilityFixAvailable value)
void SetReferenceUrls(ReferenceUrlsT &&value)
Vulnerability & WithLastKnownExploitAt(LastKnownExploitAtT &&value)
void SetRelatedVulnerabilities(RelatedVulnerabilitiesT &&value)
const Aws::String & GetLastKnownExploitAt() const
Vulnerability & AddRelatedVulnerabilities(RelatedVulnerabilitiesT &&value)
Vulnerability & AddReferenceUrls(ReferenceUrlsT &&value)
const Aws::Vector< Aws::String > & GetReferenceUrls() const
const Aws::Vector< VulnerabilityCodeVulnerabilities > & GetCodeVulnerabilities() const
Vulnerability & WithCvss(CvssT &&value)
void SetLastKnownExploitAt(LastKnownExploitAtT &&value)
VulnerabilityFixAvailable GetFixAvailable() const
VulnerabilityExploitAvailable GetExploitAvailable() const
const Aws::String & GetId() const
Vulnerability & WithEpssScore(double value)
void SetCodeVulnerabilities(CodeVulnerabilitiesT &&value)
Vulnerability & WithVendor(VendorT &&value)
Vulnerability & WithVulnerablePackages(VulnerablePackagesT &&value)
Vulnerability & WithExploitAvailable(VulnerabilityExploitAvailable value)
Vulnerability & AddVulnerablePackages(VulnerablePackagesT &&value)
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_SECURITYHUB_API Vulnerability & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetFixAvailable(VulnerabilityFixAvailable value)
void SetExploitAvailable(VulnerabilityExploitAvailable value)
Vulnerability & AddCvss(CvssT &&value)
Vulnerability & WithReferenceUrls(ReferenceUrlsT &&value)
const Aws::Vector< SoftwarePackage > & GetVulnerablePackages() const
const Aws::Vector< Cvss > & GetCvss() const
void SetVulnerablePackages(VulnerablePackagesT &&value)
Vulnerability & WithRelatedVulnerabilities(RelatedVulnerabilitiesT &&value)
Vulnerability & WithCodeVulnerabilities(CodeVulnerabilitiesT &&value)
AWS_SECURITYHUB_API Vulnerability()=default
const VulnerabilityVendor & GetVendor() const
const Aws::Vector< Aws::String > & GetRelatedVulnerabilities() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue