AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
GetInstanceMetricDataRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lightsail/LightsailRequest.h>
11#include <aws/lightsail/Lightsail_EXPORTS.h>
12#include <aws/lightsail/model/InstanceMetricName.h>
13#include <aws/lightsail/model/MetricStatistic.h>
14#include <aws/lightsail/model/MetricUnit.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Lightsail {
20namespace Model {
21
25 public:
26 AWS_LIGHTSAIL_API GetInstanceMetricDataRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "GetInstanceMetricData"; }
33
34 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
35
37
39
42 inline const Aws::String& GetInstanceName() const { return m_instanceName; }
43 inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; }
44 template <typename InstanceNameT = Aws::String>
45 void SetInstanceName(InstanceNameT&& value) {
46 m_instanceNameHasBeenSet = true;
47 m_instanceName = std::forward<InstanceNameT>(value);
48 }
49 template <typename InstanceNameT = Aws::String>
51 SetInstanceName(std::forward<InstanceNameT>(value));
52 return *this;
53 }
55
57
133 inline InstanceMetricName GetMetricName() const { return m_metricName; }
134 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
136 m_metricNameHasBeenSet = true;
137 m_metricName = value;
138 }
140 SetMetricName(value);
141 return *this;
142 }
144
146
153 inline int GetPeriod() const { return m_period; }
154 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
155 inline void SetPeriod(int value) {
156 m_periodHasBeenSet = true;
157 m_period = value;
158 }
160 SetPeriod(value);
161 return *this;
162 }
164
166
169 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
170 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
171 template <typename StartTimeT = Aws::Utils::DateTime>
172 void SetStartTime(StartTimeT&& value) {
173 m_startTimeHasBeenSet = true;
174 m_startTime = std::forward<StartTimeT>(value);
175 }
176 template <typename StartTimeT = Aws::Utils::DateTime>
178 SetStartTime(std::forward<StartTimeT>(value));
179 return *this;
180 }
182
184
187 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
188 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
189 template <typename EndTimeT = Aws::Utils::DateTime>
190 void SetEndTime(EndTimeT&& value) {
191 m_endTimeHasBeenSet = true;
192 m_endTime = std::forward<EndTimeT>(value);
193 }
194 template <typename EndTimeT = Aws::Utils::DateTime>
196 SetEndTime(std::forward<EndTimeT>(value));
197 return *this;
198 }
200
202
207 inline MetricUnit GetUnit() const { return m_unit; }
208 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
209 inline void SetUnit(MetricUnit value) {
210 m_unitHasBeenSet = true;
211 m_unit = value;
212 }
214 SetUnit(value);
215 return *this;
216 }
218
220
237 inline const Aws::Vector<MetricStatistic>& GetStatistics() const { return m_statistics; }
238 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
239 template <typename StatisticsT = Aws::Vector<MetricStatistic>>
240 void SetStatistics(StatisticsT&& value) {
241 m_statisticsHasBeenSet = true;
242 m_statistics = std::forward<StatisticsT>(value);
243 }
244 template <typename StatisticsT = Aws::Vector<MetricStatistic>>
246 SetStatistics(std::forward<StatisticsT>(value));
247 return *this;
248 }
250 m_statisticsHasBeenSet = true;
251 m_statistics.push_back(value);
252 return *this;
253 }
255 private:
256 Aws::String m_instanceName;
257 bool m_instanceNameHasBeenSet = false;
258
260 bool m_metricNameHasBeenSet = false;
261
262 int m_period{0};
263 bool m_periodHasBeenSet = false;
264
265 Aws::Utils::DateTime m_startTime{};
266 bool m_startTimeHasBeenSet = false;
267
268 Aws::Utils::DateTime m_endTime{};
269 bool m_endTimeHasBeenSet = false;
270
272 bool m_unitHasBeenSet = false;
273
274 Aws::Vector<MetricStatistic> m_statistics;
275 bool m_statisticsHasBeenSet = false;
276};
277
278} // namespace Model
279} // namespace Lightsail
280} // namespace Aws
GetInstanceMetricDataRequest & WithUnit(MetricUnit value)
GetInstanceMetricDataRequest & WithStartTime(StartTimeT &&value)
const Aws::Vector< MetricStatistic > & GetStatistics() const
GetInstanceMetricDataRequest & WithEndTime(EndTimeT &&value)
AWS_LIGHTSAIL_API GetInstanceMetricDataRequest()=default
GetInstanceMetricDataRequest & WithMetricName(InstanceMetricName value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GetInstanceMetricDataRequest & WithInstanceName(InstanceNameT &&value)
GetInstanceMetricDataRequest & AddStatistics(MetricStatistic value)
GetInstanceMetricDataRequest & WithStatistics(StatisticsT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector