AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
GetInstanceMetricDataRequest.h
1
6#pragma once
7#include <aws/lightsail/Lightsail_EXPORTS.h>
8#include <aws/lightsail/LightsailRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lightsail/model/InstanceMetricName.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/lightsail/model/MetricUnit.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/lightsail/model/MetricStatistic.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Lightsail
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_LIGHTSAIL_API GetInstanceMetricDataRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "GetInstanceMetricData"; }
36
37 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
38
40
41
43
46 inline const Aws::String& GetInstanceName() const { return m_instanceName; }
47 inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; }
48 template<typename InstanceNameT = Aws::String>
49 void SetInstanceName(InstanceNameT&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::forward<InstanceNameT>(value); }
50 template<typename InstanceNameT = Aws::String>
51 GetInstanceMetricDataRequest& WithInstanceName(InstanceNameT&& value) { SetInstanceName(std::forward<InstanceNameT>(value)); return *this;}
53
55
131 inline InstanceMetricName GetMetricName() const { return m_metricName; }
132 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
133 inline void SetMetricName(InstanceMetricName value) { m_metricNameHasBeenSet = true; m_metricName = value; }
136
138
145 inline int GetPeriod() const { return m_period; }
146 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
147 inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; }
148 inline GetInstanceMetricDataRequest& WithPeriod(int value) { SetPeriod(value); return *this;}
150
152
155 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
156 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
157 template<typename StartTimeT = Aws::Utils::DateTime>
158 void SetStartTime(StartTimeT&& value) { m_startTimeHasBeenSet = true; m_startTime = std::forward<StartTimeT>(value); }
159 template<typename StartTimeT = Aws::Utils::DateTime>
160 GetInstanceMetricDataRequest& WithStartTime(StartTimeT&& value) { SetStartTime(std::forward<StartTimeT>(value)); return *this;}
162
164
167 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
168 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
169 template<typename EndTimeT = Aws::Utils::DateTime>
170 void SetEndTime(EndTimeT&& value) { m_endTimeHasBeenSet = true; m_endTime = std::forward<EndTimeT>(value); }
171 template<typename EndTimeT = Aws::Utils::DateTime>
172 GetInstanceMetricDataRequest& WithEndTime(EndTimeT&& value) { SetEndTime(std::forward<EndTimeT>(value)); return *this;}
174
176
181 inline MetricUnit GetUnit() const { return m_unit; }
182 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
183 inline void SetUnit(MetricUnit value) { m_unitHasBeenSet = true; m_unit = value; }
184 inline GetInstanceMetricDataRequest& WithUnit(MetricUnit value) { SetUnit(value); return *this;}
186
188
205 inline const Aws::Vector<MetricStatistic>& GetStatistics() const { return m_statistics; }
206 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
207 template<typename StatisticsT = Aws::Vector<MetricStatistic>>
208 void SetStatistics(StatisticsT&& value) { m_statisticsHasBeenSet = true; m_statistics = std::forward<StatisticsT>(value); }
209 template<typename StatisticsT = Aws::Vector<MetricStatistic>>
210 GetInstanceMetricDataRequest& WithStatistics(StatisticsT&& value) { SetStatistics(std::forward<StatisticsT>(value)); return *this;}
211 inline GetInstanceMetricDataRequest& AddStatistics(MetricStatistic value) { m_statisticsHasBeenSet = true; m_statistics.push_back(value); return *this; }
213 private:
214
215 Aws::String m_instanceName;
216 bool m_instanceNameHasBeenSet = false;
217
219 bool m_metricNameHasBeenSet = false;
220
221 int m_period{0};
222 bool m_periodHasBeenSet = false;
223
224 Aws::Utils::DateTime m_startTime{};
225 bool m_startTimeHasBeenSet = false;
226
227 Aws::Utils::DateTime m_endTime{};
228 bool m_endTimeHasBeenSet = false;
229
231 bool m_unitHasBeenSet = false;
232
233 Aws::Vector<MetricStatistic> m_statistics;
234 bool m_statisticsHasBeenSet = false;
235 };
236
237} // namespace Model
238} // namespace Lightsail
239} // 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