AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
GetCostAndUsageRequest.h
1
6#pragma once
7#include <aws/ce/CostExplorer_EXPORTS.h>
8#include <aws/ce/CostExplorerRequest.h>
9#include <aws/ce/model/DateInterval.h>
10#include <aws/ce/model/Granularity.h>
11#include <aws/ce/model/Expression.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/ce/model/GroupDefinition.h>
15#include <utility>
16
17namespace Aws
18{
19namespace CostExplorer
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_COSTEXPLORER_API GetCostAndUsageRequest() = 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 "GetCostAndUsage"; }
36
37 AWS_COSTEXPLORER_API Aws::String SerializePayload() const override;
38
39 AWS_COSTEXPLORER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
40
41
43
51 inline const DateInterval& GetTimePeriod() const { return m_timePeriod; }
52 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
53 template<typename TimePeriodT = DateInterval>
54 void SetTimePeriod(TimePeriodT&& value) { m_timePeriodHasBeenSet = true; m_timePeriod = std::forward<TimePeriodT>(value); }
55 template<typename TimePeriodT = DateInterval>
56 GetCostAndUsageRequest& WithTimePeriod(TimePeriodT&& value) { SetTimePeriod(std::forward<TimePeriodT>(value)); return *this;}
58
60
66 inline Granularity GetGranularity() const { return m_granularity; }
67 inline bool GranularityHasBeenSet() const { return m_granularityHasBeenSet; }
68 inline void SetGranularity(Granularity value) { m_granularityHasBeenSet = true; m_granularity = value; }
69 inline GetCostAndUsageRequest& WithGranularity(Granularity value) { SetGranularity(value); return *this;}
71
73
86 inline const Expression& GetFilter() const { return m_filter; }
87 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
88 template<typename FilterT = Expression>
89 void SetFilter(FilterT&& value) { m_filterHasBeenSet = true; m_filter = std::forward<FilterT>(value); }
90 template<typename FilterT = Expression>
91 GetCostAndUsageRequest& WithFilter(FilterT&& value) { SetFilter(std::forward<FilterT>(value)); return *this;}
93
95
113 inline const Aws::Vector<Aws::String>& GetMetrics() const { return m_metrics; }
114 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
115 template<typename MetricsT = Aws::Vector<Aws::String>>
116 void SetMetrics(MetricsT&& value) { m_metricsHasBeenSet = true; m_metrics = std::forward<MetricsT>(value); }
117 template<typename MetricsT = Aws::Vector<Aws::String>>
118 GetCostAndUsageRequest& WithMetrics(MetricsT&& value) { SetMetrics(std::forward<MetricsT>(value)); return *this;}
119 template<typename MetricsT = Aws::String>
120 GetCostAndUsageRequest& AddMetrics(MetricsT&& value) { m_metricsHasBeenSet = true; m_metrics.emplace_back(std::forward<MetricsT>(value)); return *this; }
122
124
135 inline const Aws::Vector<GroupDefinition>& GetGroupBy() const { return m_groupBy; }
136 inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
137 template<typename GroupByT = Aws::Vector<GroupDefinition>>
138 void SetGroupBy(GroupByT&& value) { m_groupByHasBeenSet = true; m_groupBy = std::forward<GroupByT>(value); }
139 template<typename GroupByT = Aws::Vector<GroupDefinition>>
140 GetCostAndUsageRequest& WithGroupBy(GroupByT&& value) { SetGroupBy(std::forward<GroupByT>(value)); return *this;}
141 template<typename GroupByT = GroupDefinition>
142 GetCostAndUsageRequest& AddGroupBy(GroupByT&& value) { m_groupByHasBeenSet = true; m_groupBy.emplace_back(std::forward<GroupByT>(value)); return *this; }
144
146
153 inline const Aws::String& GetBillingViewArn() const { return m_billingViewArn; }
154 inline bool BillingViewArnHasBeenSet() const { return m_billingViewArnHasBeenSet; }
155 template<typename BillingViewArnT = Aws::String>
156 void SetBillingViewArn(BillingViewArnT&& value) { m_billingViewArnHasBeenSet = true; m_billingViewArn = std::forward<BillingViewArnT>(value); }
157 template<typename BillingViewArnT = Aws::String>
158 GetCostAndUsageRequest& WithBillingViewArn(BillingViewArnT&& value) { SetBillingViewArn(std::forward<BillingViewArnT>(value)); return *this;}
160
162
167 inline const Aws::String& GetNextPageToken() const { return m_nextPageToken; }
168 inline bool NextPageTokenHasBeenSet() const { return m_nextPageTokenHasBeenSet; }
169 template<typename NextPageTokenT = Aws::String>
170 void SetNextPageToken(NextPageTokenT&& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = std::forward<NextPageTokenT>(value); }
171 template<typename NextPageTokenT = Aws::String>
172 GetCostAndUsageRequest& WithNextPageToken(NextPageTokenT&& value) { SetNextPageToken(std::forward<NextPageTokenT>(value)); return *this;}
174 private:
175
176 DateInterval m_timePeriod;
177 bool m_timePeriodHasBeenSet = false;
178
179 Granularity m_granularity{Granularity::NOT_SET};
180 bool m_granularityHasBeenSet = false;
181
182 Expression m_filter;
183 bool m_filterHasBeenSet = false;
184
185 Aws::Vector<Aws::String> m_metrics;
186 bool m_metricsHasBeenSet = false;
187
189 bool m_groupByHasBeenSet = false;
190
191 Aws::String m_billingViewArn;
192 bool m_billingViewArnHasBeenSet = false;
193
194 Aws::String m_nextPageToken;
195 bool m_nextPageTokenHasBeenSet = false;
196 };
197
198} // namespace Model
199} // namespace CostExplorer
200} // 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