AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
MetricsByTime.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/cost-optimization-hub/CostOptimizationHub_EXPORTS.h>
9
10#include <utility>
11
12namespace Aws {
13namespace Utils {
14namespace Json {
15class JsonValue;
16class JsonView;
17} // namespace Json
18} // namespace Utils
19namespace CostOptimizationHub {
20namespace Model {
21
30 public:
31 AWS_COSTOPTIMIZATIONHUB_API MetricsByTime() = default;
32 AWS_COSTOPTIMIZATIONHUB_API MetricsByTime(Aws::Utils::Json::JsonView jsonValue);
33 AWS_COSTOPTIMIZATIONHUB_API MetricsByTime& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_COSTOPTIMIZATIONHUB_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
42 inline double GetScore() const { return m_score; }
43 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
44 inline void SetScore(double value) {
45 m_scoreHasBeenSet = true;
46 m_score = value;
47 }
48 inline MetricsByTime& WithScore(double value) {
49 SetScore(value);
50 return *this;
51 }
53
55
59 inline double GetSavings() const { return m_savings; }
60 inline bool SavingsHasBeenSet() const { return m_savingsHasBeenSet; }
61 inline void SetSavings(double value) {
62 m_savingsHasBeenSet = true;
63 m_savings = value;
64 }
65 inline MetricsByTime& WithSavings(double value) {
66 SetSavings(value);
67 return *this;
68 }
70
72
75 inline double GetSpend() const { return m_spend; }
76 inline bool SpendHasBeenSet() const { return m_spendHasBeenSet; }
77 inline void SetSpend(double value) {
78 m_spendHasBeenSet = true;
79 m_spend = value;
80 }
81 inline MetricsByTime& WithSpend(double value) {
82 SetSpend(value);
83 return *this;
84 }
86
88
92 inline const Aws::String& GetTimestamp() const { return m_timestamp; }
93 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
94 template <typename TimestampT = Aws::String>
95 void SetTimestamp(TimestampT&& value) {
96 m_timestampHasBeenSet = true;
97 m_timestamp = std::forward<TimestampT>(value);
98 }
99 template <typename TimestampT = Aws::String>
100 MetricsByTime& WithTimestamp(TimestampT&& value) {
101 SetTimestamp(std::forward<TimestampT>(value));
102 return *this;
103 }
105 private:
106 double m_score{0.0};
107
108 double m_savings{0.0};
109
110 double m_spend{0.0};
111
112 Aws::String m_timestamp;
113 bool m_scoreHasBeenSet = false;
114 bool m_savingsHasBeenSet = false;
115 bool m_spendHasBeenSet = false;
116 bool m_timestampHasBeenSet = false;
117};
118
119} // namespace Model
120} // namespace CostOptimizationHub
121} // namespace Aws
MetricsByTime & WithSpend(double value)
AWS_COSTOPTIMIZATIONHUB_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COSTOPTIMIZATIONHUB_API MetricsByTime(Aws::Utils::Json::JsonView jsonValue)
AWS_COSTOPTIMIZATIONHUB_API MetricsByTime & operator=(Aws::Utils::Json::JsonView jsonValue)
MetricsByTime & WithScore(double value)
MetricsByTime & WithSavings(double value)
AWS_COSTOPTIMIZATIONHUB_API MetricsByTime()=default
MetricsByTime & WithTimestamp(TimestampT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue