AWS SDK for C++

AWS SDK for C++ Version 1.11.740

Loading...
Searching...
No Matches
ResiliencyScore.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/resiliencehub/ResilienceHub_EXPORTS.h>
9#include <aws/resiliencehub/model/DisruptionType.h>
10#include <aws/resiliencehub/model/ResiliencyScoreType.h>
11#include <aws/resiliencehub/model/ScoringComponentResiliencyScore.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace ResilienceHub {
23namespace Model {
24
32 public:
33 AWS_RESILIENCEHUB_API ResiliencyScore() = default;
34 AWS_RESILIENCEHUB_API ResiliencyScore(Aws::Utils::Json::JsonView jsonValue);
35 AWS_RESILIENCEHUB_API ResiliencyScore& operator=(Aws::Utils::Json::JsonView jsonValue);
36 AWS_RESILIENCEHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
37
39
46 inline bool ComponentScoreHasBeenSet() const { return m_componentScoreHasBeenSet; }
47 template <typename ComponentScoreT = Aws::Map<ResiliencyScoreType, ScoringComponentResiliencyScore>>
48 void SetComponentScore(ComponentScoreT&& value) {
49 m_componentScoreHasBeenSet = true;
50 m_componentScore = std::forward<ComponentScoreT>(value);
51 }
52 template <typename ComponentScoreT = Aws::Map<ResiliencyScoreType, ScoringComponentResiliencyScore>>
53 ResiliencyScore& WithComponentScore(ComponentScoreT&& value) {
54 SetComponentScore(std::forward<ComponentScoreT>(value));
55 return *this;
56 }
58 m_componentScoreHasBeenSet = true;
59 m_componentScore.emplace(key, value);
60 return *this;
61 }
63
65
68 inline const Aws::Map<DisruptionType, double>& GetDisruptionScore() const { return m_disruptionScore; }
69 inline bool DisruptionScoreHasBeenSet() const { return m_disruptionScoreHasBeenSet; }
70 template <typename DisruptionScoreT = Aws::Map<DisruptionType, double>>
71 void SetDisruptionScore(DisruptionScoreT&& value) {
72 m_disruptionScoreHasBeenSet = true;
73 m_disruptionScore = std::forward<DisruptionScoreT>(value);
74 }
75 template <typename DisruptionScoreT = Aws::Map<DisruptionType, double>>
76 ResiliencyScore& WithDisruptionScore(DisruptionScoreT&& value) {
77 SetDisruptionScore(std::forward<DisruptionScoreT>(value));
78 return *this;
79 }
81 m_disruptionScoreHasBeenSet = true;
82 m_disruptionScore.emplace(key, value);
83 return *this;
84 }
86
88
91 inline double GetScore() const { return m_score; }
92 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
93 inline void SetScore(double value) {
94 m_scoreHasBeenSet = true;
95 m_score = value;
96 }
97 inline ResiliencyScore& WithScore(double value) {
98 SetScore(value);
99 return *this;
100 }
102 private:
104
105 Aws::Map<DisruptionType, double> m_disruptionScore;
106
107 double m_score{0.0};
108 bool m_componentScoreHasBeenSet = false;
109 bool m_disruptionScoreHasBeenSet = false;
110 bool m_scoreHasBeenSet = false;
111};
112
113} // namespace Model
114} // namespace ResilienceHub
115} // namespace Aws
ResiliencyScore & AddComponentScore(ResiliencyScoreType key, ScoringComponentResiliencyScore value)
const Aws::Map< DisruptionType, double > & GetDisruptionScore() const
AWS_RESILIENCEHUB_API ResiliencyScore()=default
ResiliencyScore & WithComponentScore(ComponentScoreT &&value)
ResiliencyScore & WithScore(double value)
AWS_RESILIENCEHUB_API Aws::Utils::Json::JsonValue Jsonize() const
void SetDisruptionScore(DisruptionScoreT &&value)
AWS_RESILIENCEHUB_API ResiliencyScore & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetComponentScore(ComponentScoreT &&value)
AWS_RESILIENCEHUB_API ResiliencyScore(Aws::Utils::Json::JsonView jsonValue)
ResiliencyScore & WithDisruptionScore(DisruptionScoreT &&value)
ResiliencyScore & AddDisruptionScore(DisruptionType key, double value)
const Aws::Map< ResiliencyScoreType, ScoringComponentResiliencyScore > & GetComponentScore() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue