AWS SDK for C++

AWS SDK for C++ Version 1.11.912

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
104 inline const Expression& GetFilter() const { return m_filter; }
105 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
106 template <typename FilterT = Expression>
107 void SetFilter(FilterT&& value) {
108 m_filterHasBeenSet = true;
109 m_filter = std::forward<FilterT>(value);
110 }
111 template <typename FilterT = Expression>
113 SetFilter(std::forward<FilterT>(value));
114 return *this;
115 }
117
119
137 inline const Aws::Vector<Aws::String>& GetMetrics() const { return m_metrics; }
138 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
139 template <typename MetricsT = Aws::Vector<Aws::String>>
140 void SetMetrics(MetricsT&& value) {
141 m_metricsHasBeenSet = true;
142 m_metrics = std::forward<MetricsT>(value);
143 }
144 template <typename MetricsT = Aws::Vector<Aws::String>>
146 SetMetrics(std::forward<MetricsT>(value));
147 return *this;
148 }
149 template <typename MetricsT = Aws::String>
151 m_metricsHasBeenSet = true;
152 m_metrics.emplace_back(std::forward<MetricsT>(value));
153 return *this;
154 }
156
158
182 inline const Aws::Vector<GroupDefinition>& GetGroupBy() const { return m_groupBy; }
183 inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
184 template <typename GroupByT = Aws::Vector<GroupDefinition>>
185 void SetGroupBy(GroupByT&& value) {
186 m_groupByHasBeenSet = true;
187 m_groupBy = std::forward<GroupByT>(value);
188 }
189 template <typename GroupByT = Aws::Vector<GroupDefinition>>
191 SetGroupBy(std::forward<GroupByT>(value));
192 return *this;
193 }
194 template <typename GroupByT = GroupDefinition>
196 m_groupByHasBeenSet = true;
197 m_groupBy.emplace_back(std::forward<GroupByT>(value));
198 return *this;
199 }
201
203
210 inline const Aws::String& GetBillingViewArn() const { return m_billingViewArn; }
211 inline bool BillingViewArnHasBeenSet() const { return m_billingViewArnHasBeenSet; }
212 template <typename BillingViewArnT = Aws::String>
213 void SetBillingViewArn(BillingViewArnT&& value) {
214 m_billingViewArnHasBeenSet = true;
215 m_billingViewArn = std::forward<BillingViewArnT>(value);
216 }
217 template <typename BillingViewArnT = Aws::String>
218 GetCostAndUsageRequest& WithBillingViewArn(BillingViewArnT&& value) {
219 SetBillingViewArn(std::forward<BillingViewArnT>(value));
220 return *this;
221 }
223
225
230 inline const Aws::String& GetNextPageToken() const { return m_nextPageToken; }
231 inline bool NextPageTokenHasBeenSet() const { return m_nextPageTokenHasBeenSet; }
232 template <typename NextPageTokenT = Aws::String>
233 void SetNextPageToken(NextPageTokenT&& value) {
234 m_nextPageTokenHasBeenSet = true;
235 m_nextPageToken = std::forward<NextPageTokenT>(value);
236 }
237 template <typename NextPageTokenT = Aws::String>
238 GetCostAndUsageRequest& WithNextPageToken(NextPageTokenT&& value) {
239 SetNextPageToken(std::forward<NextPageTokenT>(value));
240 return *this;
241 }
243 private:
244 DateInterval m_timePeriod;
245
246 Granularity m_granularity{Granularity::NOT_SET};
247
248 Expression m_filter;
249
250 Aws::Vector<Aws::String> m_metrics;
251
253
254 Aws::String m_billingViewArn;
255
256 Aws::String m_nextPageToken;
257 bool m_timePeriodHasBeenSet = false;
258 bool m_granularityHasBeenSet = false;
259 bool m_filterHasBeenSet = false;
260 bool m_metricsHasBeenSet = false;
261 bool m_groupByHasBeenSet = false;
262 bool m_billingViewArnHasBeenSet = false;
263 bool m_nextPageTokenHasBeenSet = false;
264};
265
266} // namespace Model
267} // namespace CostExplorer
268} // 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