AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Cvss.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/Adjustment.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace SecurityHub {
22namespace Model {
23
30class Cvss {
31 public:
32 AWS_SECURITYHUB_API Cvss() = default;
33 AWS_SECURITYHUB_API Cvss(Aws::Utils::Json::JsonView jsonValue);
34 AWS_SECURITYHUB_API Cvss& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetVersion() const { return m_version; }
42 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
43 template <typename VersionT = Aws::String>
44 void SetVersion(VersionT&& value) {
45 m_versionHasBeenSet = true;
46 m_version = std::forward<VersionT>(value);
47 }
48 template <typename VersionT = Aws::String>
49 Cvss& WithVersion(VersionT&& value) {
50 SetVersion(std::forward<VersionT>(value));
51 return *this;
52 }
54
56
59 inline double GetBaseScore() const { return m_baseScore; }
60 inline bool BaseScoreHasBeenSet() const { return m_baseScoreHasBeenSet; }
61 inline void SetBaseScore(double value) {
62 m_baseScoreHasBeenSet = true;
63 m_baseScore = value;
64 }
65 inline Cvss& WithBaseScore(double value) {
66 SetBaseScore(value);
67 return *this;
68 }
70
72
75 inline const Aws::String& GetBaseVector() const { return m_baseVector; }
76 inline bool BaseVectorHasBeenSet() const { return m_baseVectorHasBeenSet; }
77 template <typename BaseVectorT = Aws::String>
78 void SetBaseVector(BaseVectorT&& value) {
79 m_baseVectorHasBeenSet = true;
80 m_baseVector = std::forward<BaseVectorT>(value);
81 }
82 template <typename BaseVectorT = Aws::String>
83 Cvss& WithBaseVector(BaseVectorT&& value) {
84 SetBaseVector(std::forward<BaseVectorT>(value));
85 return *this;
86 }
88
90
93 inline const Aws::String& GetSource() const { return m_source; }
94 inline bool SourceHasBeenSet() const { return m_sourceHasBeenSet; }
95 template <typename SourceT = Aws::String>
96 void SetSource(SourceT&& value) {
97 m_sourceHasBeenSet = true;
98 m_source = std::forward<SourceT>(value);
99 }
100 template <typename SourceT = Aws::String>
101 Cvss& WithSource(SourceT&& value) {
102 SetSource(std::forward<SourceT>(value));
103 return *this;
104 }
106
108
111 inline const Aws::Vector<Adjustment>& GetAdjustments() const { return m_adjustments; }
112 inline bool AdjustmentsHasBeenSet() const { return m_adjustmentsHasBeenSet; }
113 template <typename AdjustmentsT = Aws::Vector<Adjustment>>
114 void SetAdjustments(AdjustmentsT&& value) {
115 m_adjustmentsHasBeenSet = true;
116 m_adjustments = std::forward<AdjustmentsT>(value);
117 }
118 template <typename AdjustmentsT = Aws::Vector<Adjustment>>
119 Cvss& WithAdjustments(AdjustmentsT&& value) {
120 SetAdjustments(std::forward<AdjustmentsT>(value));
121 return *this;
122 }
123 template <typename AdjustmentsT = Adjustment>
124 Cvss& AddAdjustments(AdjustmentsT&& value) {
125 m_adjustmentsHasBeenSet = true;
126 m_adjustments.emplace_back(std::forward<AdjustmentsT>(value));
127 return *this;
128 }
130 private:
131 Aws::String m_version;
132
133 double m_baseScore{0.0};
134
135 Aws::String m_baseVector;
136
137 Aws::String m_source;
138
139 Aws::Vector<Adjustment> m_adjustments;
140 bool m_versionHasBeenSet = false;
141 bool m_baseScoreHasBeenSet = false;
142 bool m_baseVectorHasBeenSet = false;
143 bool m_sourceHasBeenSet = false;
144 bool m_adjustmentsHasBeenSet = false;
145};
146
147} // namespace Model
148} // namespace SecurityHub
149} // namespace Aws
bool BaseScoreHasBeenSet() const
Definition Cvss.h:60
Cvss & WithBaseVector(BaseVectorT &&value)
Definition Cvss.h:83
Cvss & WithVersion(VersionT &&value)
Definition Cvss.h:49
bool AdjustmentsHasBeenSet() const
Definition Cvss.h:112
Cvss & WithAdjustments(AdjustmentsT &&value)
Definition Cvss.h:119
AWS_SECURITYHUB_API Cvss & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetAdjustments(AdjustmentsT &&value)
Definition Cvss.h:114
bool BaseVectorHasBeenSet() const
Definition Cvss.h:76
void SetVersion(VersionT &&value)
Definition Cvss.h:44
void SetSource(SourceT &&value)
Definition Cvss.h:96
const Aws::Vector< Adjustment > & GetAdjustments() const
Definition Cvss.h:111
void SetBaseScore(double value)
Definition Cvss.h:61
AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetSource() const
Definition Cvss.h:93
Cvss & WithBaseScore(double value)
Definition Cvss.h:65
Cvss & WithSource(SourceT &&value)
Definition Cvss.h:101
const Aws::String & GetVersion() const
Definition Cvss.h:41
const Aws::String & GetBaseVector() const
Definition Cvss.h:75
bool SourceHasBeenSet() const
Definition Cvss.h:94
AWS_SECURITYHUB_API Cvss(Aws::Utils::Json::JsonView jsonValue)
AWS_SECURITYHUB_API Cvss()=default
double GetBaseScore() const
Definition Cvss.h:59
bool VersionHasBeenSet() const
Definition Cvss.h:42
void SetBaseVector(BaseVectorT &&value)
Definition Cvss.h:78
Cvss & AddAdjustments(AdjustmentsT &&value)
Definition Cvss.h:124
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue