AWS SDK for C++

AWS SDK for C++ Version 1.11.929

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
172 inline InstanceMetricName GetMetricName() const { return m_metricName; }
173 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
175 m_metricNameHasBeenSet = true;
176 m_metricName = value;
177 }
179 SetMetricName(value);
180 return *this;
181 }
183
185
192 inline int GetPeriod() const { return m_period; }
193 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
194 inline void SetPeriod(int value) {
195 m_periodHasBeenSet = true;
196 m_period = value;
197 }
199 SetPeriod(value);
200 return *this;
201 }
203
205
208 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
209 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
210 template <typename StartTimeT = Aws::Utils::DateTime>
211 void SetStartTime(StartTimeT&& value) {
212 m_startTimeHasBeenSet = true;
213 m_startTime = std::forward<StartTimeT>(value);
214 }
215 template <typename StartTimeT = Aws::Utils::DateTime>
217 SetStartTime(std::forward<StartTimeT>(value));
218 return *this;
219 }
221
223
226 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
227 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
228 template <typename EndTimeT = Aws::Utils::DateTime>
229 void SetEndTime(EndTimeT&& value) {
230 m_endTimeHasBeenSet = true;
231 m_endTime = std::forward<EndTimeT>(value);
232 }
233 template <typename EndTimeT = Aws::Utils::DateTime>
235 SetEndTime(std::forward<EndTimeT>(value));
236 return *this;
237 }
239
241
246 inline MetricUnit GetUnit() const { return m_unit; }
247 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
248 inline void SetUnit(MetricUnit value) {
249 m_unitHasBeenSet = true;
250 m_unit = value;
251 }
253 SetUnit(value);
254 return *this;
255 }
257
259
276 inline const Aws::Vector<MetricStatistic>& GetStatistics() const { return m_statistics; }
277 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
278 template <typename StatisticsT = Aws::Vector<MetricStatistic>>
279 void SetStatistics(StatisticsT&& value) {
280 m_statisticsHasBeenSet = true;
281 m_statistics = std::forward<StatisticsT>(value);
282 }
283 template <typename StatisticsT = Aws::Vector<MetricStatistic>>
285 SetStatistics(std::forward<StatisticsT>(value));
286 return *this;
287 }
289 m_statisticsHasBeenSet = true;
290 m_statistics.push_back(value);
291 return *this;
292 }
294 private:
295 Aws::String m_instanceName;
296
298
299 int m_period{0};
300
301 Aws::Utils::DateTime m_startTime{};
302
303 Aws::Utils::DateTime m_endTime{};
304
306
307 Aws::Vector<MetricStatistic> m_statistics;
308 bool m_instanceNameHasBeenSet = false;
309 bool m_metricNameHasBeenSet = false;
310 bool m_periodHasBeenSet = false;
311 bool m_startTimeHasBeenSet = false;
312 bool m_endTimeHasBeenSet = false;
313 bool m_unitHasBeenSet = false;
314 bool m_statisticsHasBeenSet = false;
315};
316
317} // namespace Model
318} // namespace Lightsail
319} // 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