AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
GetBucketMetricDataRequest.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/BucketMetricName.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/lightsail/model/MetricUnit.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 GetBucketMetricDataRequest() = 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 "GetBucketMetricData"; }
36
37 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
38
40
41
43
46 inline const Aws::String& GetBucketName() const { return m_bucketName; }
47 inline bool BucketNameHasBeenSet() const { return m_bucketNameHasBeenSet; }
48 template<typename BucketNameT = Aws::String>
49 void SetBucketName(BucketNameT&& value) { m_bucketNameHasBeenSet = true; m_bucketName = std::forward<BucketNameT>(value); }
50 template<typename BucketNameT = Aws::String>
51 GetBucketMetricDataRequest& WithBucketName(BucketNameT&& value) { SetBucketName(std::forward<BucketNameT>(value)); return *this;}
53
55
72 inline BucketMetricName GetMetricName() const { return m_metricName; }
73 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
74 inline void SetMetricName(BucketMetricName value) { m_metricNameHasBeenSet = true; m_metricName = value; }
77
79
82 inline const Aws::Utils::DateTime& GetStartTime() const { return m_startTime; }
83 inline bool StartTimeHasBeenSet() const { return m_startTimeHasBeenSet; }
84 template<typename StartTimeT = Aws::Utils::DateTime>
85 void SetStartTime(StartTimeT&& value) { m_startTimeHasBeenSet = true; m_startTime = std::forward<StartTimeT>(value); }
86 template<typename StartTimeT = Aws::Utils::DateTime>
87 GetBucketMetricDataRequest& WithStartTime(StartTimeT&& value) { SetStartTime(std::forward<StartTimeT>(value)); return *this;}
89
91
94 inline const Aws::Utils::DateTime& GetEndTime() const { return m_endTime; }
95 inline bool EndTimeHasBeenSet() const { return m_endTimeHasBeenSet; }
96 template<typename EndTimeT = Aws::Utils::DateTime>
97 void SetEndTime(EndTimeT&& value) { m_endTimeHasBeenSet = true; m_endTime = std::forward<EndTimeT>(value); }
98 template<typename EndTimeT = Aws::Utils::DateTime>
99 GetBucketMetricDataRequest& WithEndTime(EndTimeT&& value) { SetEndTime(std::forward<EndTimeT>(value)); return *this;}
101
103
109 inline int GetPeriod() const { return m_period; }
110 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
111 inline void SetPeriod(int value) { m_periodHasBeenSet = true; m_period = value; }
112 inline GetBucketMetricDataRequest& WithPeriod(int value) { SetPeriod(value); return *this;}
114
116
134 inline const Aws::Vector<MetricStatistic>& GetStatistics() const { return m_statistics; }
135 inline bool StatisticsHasBeenSet() const { return m_statisticsHasBeenSet; }
136 template<typename StatisticsT = Aws::Vector<MetricStatistic>>
137 void SetStatistics(StatisticsT&& value) { m_statisticsHasBeenSet = true; m_statistics = std::forward<StatisticsT>(value); }
138 template<typename StatisticsT = Aws::Vector<MetricStatistic>>
139 GetBucketMetricDataRequest& WithStatistics(StatisticsT&& value) { SetStatistics(std::forward<StatisticsT>(value)); return *this;}
140 inline GetBucketMetricDataRequest& AddStatistics(MetricStatistic value) { m_statisticsHasBeenSet = true; m_statistics.push_back(value); return *this; }
142
144
149 inline MetricUnit GetUnit() const { return m_unit; }
150 inline bool UnitHasBeenSet() const { return m_unitHasBeenSet; }
151 inline void SetUnit(MetricUnit value) { m_unitHasBeenSet = true; m_unit = value; }
152 inline GetBucketMetricDataRequest& WithUnit(MetricUnit value) { SetUnit(value); return *this;}
154 private:
155
156 Aws::String m_bucketName;
157 bool m_bucketNameHasBeenSet = false;
158
160 bool m_metricNameHasBeenSet = false;
161
162 Aws::Utils::DateTime m_startTime{};
163 bool m_startTimeHasBeenSet = false;
164
165 Aws::Utils::DateTime m_endTime{};
166 bool m_endTimeHasBeenSet = false;
167
168 int m_period{0};
169 bool m_periodHasBeenSet = false;
170
171 Aws::Vector<MetricStatistic> m_statistics;
172 bool m_statisticsHasBeenSet = false;
173
175 bool m_unitHasBeenSet = false;
176 };
177
178} // namespace Model
179} // namespace Lightsail
180} // 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