AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
GetCostAndUsageRequest.h
1
6#pragma once
7#include <aws/ce/CostExplorerRequest.h>
8#include <aws/ce/CostExplorer_EXPORTS.h>
9#include <aws/ce/model/DateInterval.h>
10#include <aws/ce/model/Expression.h>
11#include <aws/ce/model/Granularity.h>
12#include <aws/ce/model/GroupDefinition.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace CostExplorer {
20namespace Model {
21
25 public:
26 AWS_COSTEXPLORER_API GetCostAndUsageRequest() = 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 "GetCostAndUsage"; }
33
34 AWS_COSTEXPLORER_API Aws::String SerializePayload() const override;
35
36 AWS_COSTEXPLORER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37
39
47 inline const DateInterval& GetTimePeriod() const { return m_timePeriod; }
48 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
49 template <typename TimePeriodT = DateInterval>
50 void SetTimePeriod(TimePeriodT&& value) {
51 m_timePeriodHasBeenSet = true;
52 m_timePeriod = std::forward<TimePeriodT>(value);
53 }
54 template <typename TimePeriodT = DateInterval>
55 GetCostAndUsageRequest& WithTimePeriod(TimePeriodT&& value) {
56 SetTimePeriod(std::forward<TimePeriodT>(value));
57 return *this;
58 }
60
62
68 inline Granularity GetGranularity() const { return m_granularity; }
69 inline bool GranularityHasBeenSet() const { return m_granularityHasBeenSet; }
70 inline void SetGranularity(Granularity value) {
71 m_granularityHasBeenSet = true;
72 m_granularity = value;
73 }
75 SetGranularity(value);
76 return *this;
77 }
79
81
94 inline const Expression& GetFilter() const { return m_filter; }
95 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
96 template <typename FilterT = Expression>
97 void SetFilter(FilterT&& value) {
98 m_filterHasBeenSet = true;
99 m_filter = std::forward<FilterT>(value);
100 }
101 template <typename FilterT = Expression>
103 SetFilter(std::forward<FilterT>(value));
104 return *this;
105 }
107
109
127 inline const Aws::Vector<Aws::String>& GetMetrics() const { return m_metrics; }
128 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
129 template <typename MetricsT = Aws::Vector<Aws::String>>
130 void SetMetrics(MetricsT&& value) {
131 m_metricsHasBeenSet = true;
132 m_metrics = std::forward<MetricsT>(value);
133 }
134 template <typename MetricsT = Aws::Vector<Aws::String>>
136 SetMetrics(std::forward<MetricsT>(value));
137 return *this;
138 }
139 template <typename MetricsT = Aws::String>
141 m_metricsHasBeenSet = true;
142 m_metrics.emplace_back(std::forward<MetricsT>(value));
143 return *this;
144 }
146
148
159 inline const Aws::Vector<GroupDefinition>& GetGroupBy() const { return m_groupBy; }
160 inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
161 template <typename GroupByT = Aws::Vector<GroupDefinition>>
162 void SetGroupBy(GroupByT&& value) {
163 m_groupByHasBeenSet = true;
164 m_groupBy = std::forward<GroupByT>(value);
165 }
166 template <typename GroupByT = Aws::Vector<GroupDefinition>>
168 SetGroupBy(std::forward<GroupByT>(value));
169 return *this;
170 }
171 template <typename GroupByT = GroupDefinition>
173 m_groupByHasBeenSet = true;
174 m_groupBy.emplace_back(std::forward<GroupByT>(value));
175 return *this;
176 }
178
180
187 inline const Aws::String& GetBillingViewArn() const { return m_billingViewArn; }
188 inline bool BillingViewArnHasBeenSet() const { return m_billingViewArnHasBeenSet; }
189 template <typename BillingViewArnT = Aws::String>
190 void SetBillingViewArn(BillingViewArnT&& value) {
191 m_billingViewArnHasBeenSet = true;
192 m_billingViewArn = std::forward<BillingViewArnT>(value);
193 }
194 template <typename BillingViewArnT = Aws::String>
195 GetCostAndUsageRequest& WithBillingViewArn(BillingViewArnT&& value) {
196 SetBillingViewArn(std::forward<BillingViewArnT>(value));
197 return *this;
198 }
200
202
207 inline const Aws::String& GetNextPageToken() const { return m_nextPageToken; }
208 inline bool NextPageTokenHasBeenSet() const { return m_nextPageTokenHasBeenSet; }
209 template <typename NextPageTokenT = Aws::String>
210 void SetNextPageToken(NextPageTokenT&& value) {
211 m_nextPageTokenHasBeenSet = true;
212 m_nextPageToken = std::forward<NextPageTokenT>(value);
213 }
214 template <typename NextPageTokenT = Aws::String>
215 GetCostAndUsageRequest& WithNextPageToken(NextPageTokenT&& value) {
216 SetNextPageToken(std::forward<NextPageTokenT>(value));
217 return *this;
218 }
220 private:
221 DateInterval m_timePeriod;
222
223 Granularity m_granularity{Granularity::NOT_SET};
224
225 Expression m_filter;
226
227 Aws::Vector<Aws::String> m_metrics;
228
230
231 Aws::String m_billingViewArn;
232
233 Aws::String m_nextPageToken;
234 bool m_timePeriodHasBeenSet = false;
235 bool m_granularityHasBeenSet = false;
236 bool m_filterHasBeenSet = false;
237 bool m_metricsHasBeenSet = false;
238 bool m_groupByHasBeenSet = false;
239 bool m_billingViewArnHasBeenSet = false;
240 bool m_nextPageTokenHasBeenSet = false;
241};
242
243} // namespace Model
244} // namespace CostExplorer
245} // namespace Aws
GetCostAndUsageRequest & AddMetrics(MetricsT &&value)
GetCostAndUsageRequest & WithGranularity(Granularity value)
GetCostAndUsageRequest & WithMetrics(MetricsT &&value)
GetCostAndUsageRequest & WithTimePeriod(TimePeriodT &&value)
GetCostAndUsageRequest & WithFilter(FilterT &&value)
AWS_COSTEXPLORER_API GetCostAndUsageRequest()=default
GetCostAndUsageRequest & WithGroupBy(GroupByT &&value)
AWS_COSTEXPLORER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
GetCostAndUsageRequest & AddGroupBy(GroupByT &&value)
const Aws::Vector< Aws::String > & GetMetrics() const
GetCostAndUsageRequest & WithBillingViewArn(BillingViewArnT &&value)
GetCostAndUsageRequest & WithNextPageToken(NextPageTokenT &&value)
const Aws::Vector< GroupDefinition > & GetGroupBy() const
AWS_COSTEXPLORER_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
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