AWS SDK for C++

AWS SDK for C++ Version 1.11.685

Loading...
Searching...
No Matches
GetBucketMetricDataRequest.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/BucketMetricName.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 GetBucketMetricDataRequest() = 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 "GetBucketMetricData"; }
33
34 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
35
37
39
42 inline const Aws::String& GetBucketName() const { return m_bucketName; }
43 inline bool BucketNameHasBeenSet() const { return m_bucketNameHasBeenSet; }
44 template <typename BucketNameT = Aws::String>
45 void SetBucketName(BucketNameT&& value) {
46 m_bucketNameHasBeenSet = true;
47 m_bucketName = std::forward<BucketNameT>(value);
48 }
49 template <typename BucketNameT = Aws::String>
51 SetBucketName(std::forward<BucketNameT>(value));
52 return *this;
53 }
55
57
74 inline BucketMetricName GetMetricName() const { return m_metricName; }
75 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
76 inline void SetMetricName(BucketMetricName value) {
77 m_metricNameHasBeenSet = true;
78 m_metricName = value;
79 }
81 SetMetricName(value);
82 return *this;
83 }
85
87
90 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
91 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
92 template <typename StartTimeT = Aws::Utils::DateTime>
93 void SetStartTime(StartTimeT&& value) {
94 m_startTimeHasBeenSet = true;
95 m_startTime = std::forward<StartTimeT>(value);
96 }
97 template <typename StartTimeT = Aws::Utils::DateTime>
99 SetStartTime(std::forward<StartTimeT>(value));
100 return *this;
101 }
103
105
108 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
109 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
110 template <typename EndTimeT = Aws::Utils::DateTime>
111 void SetEndTime(EndTimeT&& value) {
112 m_endTimeHasBeenSet = true;
113 m_endTime = std::forward<EndTimeT>(value);
114 }
115 template <typename EndTimeT = Aws::Utils::DateTime>
117 SetEndTime(std::forward<EndTimeT>(value));
118 return *this;
119 }
121
123
129 inline int GetPeriod() const { return m_period; }
130 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
131 inline void SetPeriod(int value) {
132 m_periodHasBeenSet = true;
133 m_period = value;
134 }
136 SetPeriod(value);
137 return *this;
138 }
140
142
160 inline const Aws::Vector<MetricStatistic>& GetStatistics() const { return m_statistics; }
161 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
162 template <typename StatisticsT = Aws::Vector<MetricStatistic>>
163 void SetStatistics(StatisticsT&& value) {
164 m_statisticsHasBeenSet = true;
165 m_statistics = std::forward<StatisticsT>(value);
166 }
167 template <typename StatisticsT = Aws::Vector<MetricStatistic>>
169 SetStatistics(std::forward<StatisticsT>(value));
170 return *this;
171 }
173 m_statisticsHasBeenSet = true;
174 m_statistics.push_back(value);
175 return *this;
176 }
178
180
185 inline MetricUnit GetUnit() const { return m_unit; }
186 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
187 inline void SetUnit(MetricUnit value) {
188 m_unitHasBeenSet = true;
189 m_unit = value;
190 }
192 SetUnit(value);
193 return *this;
194 }
196 private:
197 Aws::String m_bucketName;
198 bool m_bucketNameHasBeenSet = false;
199
201 bool m_metricNameHasBeenSet = false;
202
203 Aws::Utils::DateTime m_startTime{};
204 bool m_startTimeHasBeenSet = false;
205
206 Aws::Utils::DateTime m_endTime{};
207 bool m_endTimeHasBeenSet = false;
208
209 int m_period{0};
210 bool m_periodHasBeenSet = false;
211
212 Aws::Vector<MetricStatistic> m_statistics;
213 bool m_statisticsHasBeenSet = false;
214
216 bool m_unitHasBeenSet = false;
217};
218
219} // namespace Model
220} // namespace Lightsail
221} // namespace Aws
GetBucketMetricDataRequest & WithUnit(MetricUnit value)
GetBucketMetricDataRequest & WithEndTime(EndTimeT &&value)
GetBucketMetricDataRequest & WithMetricName(BucketMetricName value)
GetBucketMetricDataRequest & AddStatistics(MetricStatistic value)
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_LIGHTSAIL_API GetBucketMetricDataRequest()=default
GetBucketMetricDataRequest & WithBucketName(BucketNameT &&value)
GetBucketMetricDataRequest & WithStartTime(StartTimeT &&value)
virtual const char * GetServiceRequestName() const override
GetBucketMetricDataRequest & WithStatistics(StatisticsT &&value)
const Aws::Vector< MetricStatistic > & GetStatistics() const
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