AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; }
49 inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); }
50 inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); }
51 inline GetInstanceMetricDataRequest& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;}
52 inline GetInstanceMetricDataRequest& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;}
53 inline GetInstanceMetricDataRequest& WithInstanceName(const char* value) { SetInstanceName(value); return *this;}
55
57
133 inline const InstanceMetricName& GetMetricName() const{ return m_metricName; }
134 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
135 inline void SetMetricName(const InstanceMetricName& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
136 inline void SetMetricName(InstanceMetricName&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
138 inline GetInstanceMetricDataRequest& WithMetricName(InstanceMetricName&& value) { SetMetricName(std::move(value)); return *this;}
140
142
149 inline int GetPeriod() const{ return m_period; }
150 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
151 inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; }
152 inline GetInstanceMetricDataRequest& WithPeriod(int value) { SetPeriod(value); return *this;}
154
156
159 inline const Aws::Utils::DateTime& GetStartTime() const{ return m_startTime; }
160 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
161 inline void SetStartTime(const Aws::Utils::DateTime& value) { m_startTimeHasBeenSet = true; m_startTime = value; }
162 inline void SetStartTime(Aws::Utils::DateTime&& value) { m_startTimeHasBeenSet = true; m_startTime = std::move(value); }
164 inline GetInstanceMetricDataRequest& WithStartTime(Aws::Utils::DateTime&& value) { SetStartTime(std::move(value)); return *this;}
166
168
171 inline const Aws::Utils::DateTime& GetEndTime() const{ return m_endTime; }
172 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
173 inline void SetEndTime(const Aws::Utils::DateTime& value) { m_endTimeHasBeenSet = true; m_endTime = value; }
174 inline void SetEndTime(Aws::Utils::DateTime&& value) { m_endTimeHasBeenSet = true; m_endTime = std::move(value); }
175 inline GetInstanceMetricDataRequest& WithEndTime(const Aws::Utils::DateTime& value) { SetEndTime(value); return *this;}
176 inline GetInstanceMetricDataRequest& WithEndTime(Aws::Utils::DateTime&& value) { SetEndTime(std::move(value)); return *this;}
178
180
185 inline const MetricUnit& GetUnit() const{ return m_unit; }
186 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
187 inline void SetUnit(const MetricUnit& value) { m_unitHasBeenSet = true; m_unit = value; }
188 inline void SetUnit(MetricUnit&& value) { m_unitHasBeenSet = true; m_unit = std::move(value); }
189 inline GetInstanceMetricDataRequest& WithUnit(const MetricUnit& value) { SetUnit(value); return *this;}
190 inline GetInstanceMetricDataRequest& WithUnit(MetricUnit&& value) { SetUnit(std::move(value)); return *this;}
192
194
211 inline const Aws::Vector<MetricStatistic>& GetStatistics() const{ return m_statistics; }
212 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
213 inline void SetStatistics(const Aws::Vector<MetricStatistic>& value) { m_statisticsHasBeenSet = true; m_statistics = value; }
214 inline void SetStatistics(Aws::Vector<MetricStatistic>&& value) { m_statisticsHasBeenSet = true; m_statistics = std::move(value); }
217 inline GetInstanceMetricDataRequest& AddStatistics(const MetricStatistic& value) { m_statisticsHasBeenSet = true; m_statistics.push_back(value); return *this; }
218 inline GetInstanceMetricDataRequest& AddStatistics(MetricStatistic&& value) { m_statisticsHasBeenSet = true; m_statistics.push_back(std::move(value)); return *this; }
220 private:
221
222 Aws::String m_instanceName;
223 bool m_instanceNameHasBeenSet = false;
224
225 InstanceMetricName m_metricName;
226 bool m_metricNameHasBeenSet = false;
227
228 int m_period;
229 bool m_periodHasBeenSet = false;
230
231 Aws::Utils::DateTime m_startTime;
232 bool m_startTimeHasBeenSet = false;
233
234 Aws::Utils::DateTime m_endTime;
235 bool m_endTimeHasBeenSet = false;
236
237 MetricUnit m_unit;
238 bool m_unitHasBeenSet = false;
239
240 Aws::Vector<MetricStatistic> m_statistics;
241 bool m_statisticsHasBeenSet = false;
242 };
243
244} // namespace Model
245} // namespace Lightsail
246} // namespace Aws
GetInstanceMetricDataRequest & WithStartTime(const Aws::Utils::DateTime &value)
GetInstanceMetricDataRequest & WithStatistics(Aws::Vector< MetricStatistic > &&value)
GetInstanceMetricDataRequest & WithInstanceName(const char *value)
const Aws::Vector< MetricStatistic > & GetStatistics() const
void SetStatistics(Aws::Vector< MetricStatistic > &&value)
GetInstanceMetricDataRequest & WithInstanceName(const Aws::String &value)
GetInstanceMetricDataRequest & WithMetricName(const InstanceMetricName &value)
GetInstanceMetricDataRequest & WithEndTime(Aws::Utils::DateTime &&value)
GetInstanceMetricDataRequest & WithEndTime(const Aws::Utils::DateTime &value)
GetInstanceMetricDataRequest & WithInstanceName(Aws::String &&value)
void SetStatistics(const Aws::Vector< MetricStatistic > &value)
GetInstanceMetricDataRequest & AddStatistics(const MetricStatistic &value)
GetInstanceMetricDataRequest & WithStatistics(const Aws::Vector< MetricStatistic > &value)
GetInstanceMetricDataRequest & WithUnit(MetricUnit &&value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
GetInstanceMetricDataRequest & WithUnit(const MetricUnit &value)
GetInstanceMetricDataRequest & WithMetricName(InstanceMetricName &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GetInstanceMetricDataRequest & AddStatistics(MetricStatistic &&value)
GetInstanceMetricDataRequest & WithStartTime(Aws::Utils::DateTime &&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