AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
ProjectedMetric.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/compute-optimizer/model/MetricName.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace ComputeOptimizer {
22namespace Model {
23
45 public:
46 AWS_COMPUTEOPTIMIZER_API ProjectedMetric() = default;
47 AWS_COMPUTEOPTIMIZER_API ProjectedMetric(Aws::Utils::Json::JsonView jsonValue);
48 AWS_COMPUTEOPTIMIZER_API ProjectedMetric& operator=(Aws::Utils::Json::JsonView jsonValue);
49 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
50
52
79 inline MetricName GetName() const { return m_name; }
80 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
81 inline void SetName(MetricName value) {
82 m_nameHasBeenSet = true;
83 m_name = value;
84 }
86 SetName(value);
87 return *this;
88 }
90
92
95 inline const Aws::Vector<Aws::Utils::DateTime>& GetTimestamps() const { return m_timestamps; }
96 inline bool TimestampsHasBeenSet() const { return m_timestampsHasBeenSet; }
97 template <typename TimestampsT = Aws::Vector<Aws::Utils::DateTime>>
98 void SetTimestamps(TimestampsT&& value) {
99 m_timestampsHasBeenSet = true;
100 m_timestamps = std::forward<TimestampsT>(value);
101 }
102 template <typename TimestampsT = Aws::Vector<Aws::Utils::DateTime>>
103 ProjectedMetric& WithTimestamps(TimestampsT&& value) {
104 SetTimestamps(std::forward<TimestampsT>(value));
105 return *this;
106 }
107 template <typename TimestampsT = Aws::Utils::DateTime>
108 ProjectedMetric& AddTimestamps(TimestampsT&& value) {
109 m_timestampsHasBeenSet = true;
110 m_timestamps.emplace_back(std::forward<TimestampsT>(value));
111 return *this;
112 }
114
116
119 inline const Aws::Vector<double>& GetValues() const { return m_values; }
120 inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
121 template <typename ValuesT = Aws::Vector<double>>
122 void SetValues(ValuesT&& value) {
123 m_valuesHasBeenSet = true;
124 m_values = std::forward<ValuesT>(value);
125 }
126 template <typename ValuesT = Aws::Vector<double>>
127 ProjectedMetric& WithValues(ValuesT&& value) {
128 SetValues(std::forward<ValuesT>(value));
129 return *this;
130 }
131 inline ProjectedMetric& AddValues(double value) {
132 m_valuesHasBeenSet = true;
133 m_values.push_back(value);
134 return *this;
135 }
137 private:
139
141
142 Aws::Vector<double> m_values;
143 bool m_nameHasBeenSet = false;
144 bool m_timestampsHasBeenSet = false;
145 bool m_valuesHasBeenSet = false;
146};
147
148} // namespace Model
149} // namespace ComputeOptimizer
150} // namespace Aws
ProjectedMetric & AddTimestamps(TimestampsT &&value)
AWS_COMPUTEOPTIMIZER_API ProjectedMetric()=default
AWS_COMPUTEOPTIMIZER_API ProjectedMetric(Aws::Utils::Json::JsonView jsonValue)
ProjectedMetric & WithName(MetricName value)
AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::Utils::DateTime > & GetTimestamps() const
ProjectedMetric & WithTimestamps(TimestampsT &&value)
const Aws::Vector< double > & GetValues() const
ProjectedMetric & WithValues(ValuesT &&value)
AWS_COMPUTEOPTIMIZER_API ProjectedMetric & operator=(Aws::Utils::Json::JsonView jsonValue)
ProjectedMetric & AddValues(double value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue