AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetTimePeriod(const DateInterval& value) { m_timePeriodHasBeenSet = true; m_timePeriod = value; }
54 inline void SetTimePeriod(DateInterval&& value) { m_timePeriodHasBeenSet = true; m_timePeriod = std::move(value); }
55 inline GetCostAndUsageRequest& WithTimePeriod(const DateInterval& value) { SetTimePeriod(value); return *this;}
56 inline GetCostAndUsageRequest& WithTimePeriod(DateInterval&& value) { SetTimePeriod(std::move(value)); return *this;}
58
60
66 inline const Granularity& GetGranularity() const{ return m_granularity; }
67 inline bool GranularityHasBeenSet() const { return m_granularityHasBeenSet; }
68 inline void SetGranularity(const Granularity& value) { m_granularityHasBeenSet = true; m_granularity = value; }
69 inline void SetGranularity(Granularity&& value) { m_granularityHasBeenSet = true; m_granularity = std::move(value); }
70 inline GetCostAndUsageRequest& WithGranularity(const Granularity& value) { SetGranularity(value); return *this;}
71 inline GetCostAndUsageRequest& WithGranularity(Granularity&& value) { SetGranularity(std::move(value)); return *this;}
73
75
88 inline const Expression& GetFilter() const{ return m_filter; }
89 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
90 inline void SetFilter(const Expression& value) { m_filterHasBeenSet = true; m_filter = value; }
91 inline void SetFilter(Expression&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); }
92 inline GetCostAndUsageRequest& WithFilter(const Expression& value) { SetFilter(value); return *this;}
93 inline GetCostAndUsageRequest& WithFilter(Expression&& value) { SetFilter(std::move(value)); return *this;}
95
97
115 inline const Aws::Vector<Aws::String>& GetMetrics() const{ return m_metrics; }
116 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
117 inline void SetMetrics(const Aws::Vector<Aws::String>& value) { m_metricsHasBeenSet = true; m_metrics = value; }
118 inline void SetMetrics(Aws::Vector<Aws::String>&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); }
119 inline GetCostAndUsageRequest& WithMetrics(const Aws::Vector<Aws::String>& value) { SetMetrics(value); return *this;}
120 inline GetCostAndUsageRequest& WithMetrics(Aws::Vector<Aws::String>&& value) { SetMetrics(std::move(value)); return *this;}
121 inline GetCostAndUsageRequest& AddMetrics(const Aws::String& value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; }
122 inline GetCostAndUsageRequest& AddMetrics(Aws::String&& value) { m_metricsHasBeenSet = true; m_metrics.push_back(std::move(value)); return *this; }
123 inline GetCostAndUsageRequest& AddMetrics(const char* value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; }
125
127
138 inline const Aws::Vector<GroupDefinition>& GetGroupBy() const{ return m_groupBy; }
139 inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
140 inline void SetGroupBy(const Aws::Vector<GroupDefinition>& value) { m_groupByHasBeenSet = true; m_groupBy = value; }
141 inline void SetGroupBy(Aws::Vector<GroupDefinition>&& value) { m_groupByHasBeenSet = true; m_groupBy = std::move(value); }
142 inline GetCostAndUsageRequest& WithGroupBy(const Aws::Vector<GroupDefinition>& value) { SetGroupBy(value); return *this;}
143 inline GetCostAndUsageRequest& WithGroupBy(Aws::Vector<GroupDefinition>&& value) { SetGroupBy(std::move(value)); return *this;}
144 inline GetCostAndUsageRequest& AddGroupBy(const GroupDefinition& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(value); return *this; }
145 inline GetCostAndUsageRequest& AddGroupBy(GroupDefinition&& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(std::move(value)); return *this; }
147
149
154 inline const Aws::String& GetNextPageToken() const{ return m_nextPageToken; }
155 inline bool NextPageTokenHasBeenSet() const { return m_nextPageTokenHasBeenSet; }
156 inline void SetNextPageToken(const Aws::String& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = value; }
157 inline void SetNextPageToken(Aws::String&& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = std::move(value); }
158 inline void SetNextPageToken(const char* value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken.assign(value); }
159 inline GetCostAndUsageRequest& WithNextPageToken(const Aws::String& value) { SetNextPageToken(value); return *this;}
160 inline GetCostAndUsageRequest& WithNextPageToken(Aws::String&& value) { SetNextPageToken(std::move(value)); return *this;}
161 inline GetCostAndUsageRequest& WithNextPageToken(const char* value) { SetNextPageToken(value); return *this;}
163 private:
164
165 DateInterval m_timePeriod;
166 bool m_timePeriodHasBeenSet = false;
167
168 Granularity m_granularity;
169 bool m_granularityHasBeenSet = false;
170
171 Expression m_filter;
172 bool m_filterHasBeenSet = false;
173
174 Aws::Vector<Aws::String> m_metrics;
175 bool m_metricsHasBeenSet = false;
176
178 bool m_groupByHasBeenSet = false;
179
180 Aws::String m_nextPageToken;
181 bool m_nextPageTokenHasBeenSet = false;
182 };
183
184} // namespace Model
185} // namespace CostExplorer
186} // namespace Aws
GetCostAndUsageRequest & AddGroupBy(GroupDefinition &&value)
GetCostAndUsageRequest & WithGranularity(const Granularity &value)
GetCostAndUsageRequest & WithFilter(const Expression &value)
GetCostAndUsageRequest & WithNextPageToken(const Aws::String &value)
GetCostAndUsageRequest & WithTimePeriod(const DateInterval &value)
GetCostAndUsageRequest & WithMetrics(const Aws::Vector< Aws::String > &value)
GetCostAndUsageRequest & WithGroupBy(const Aws::Vector< GroupDefinition > &value)
GetCostAndUsageRequest & AddGroupBy(const GroupDefinition &value)
void SetGroupBy(Aws::Vector< GroupDefinition > &&value)
AWS_COSTEXPLORER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetGroupBy(const Aws::Vector< GroupDefinition > &value)
GetCostAndUsageRequest & WithNextPageToken(Aws::String &&value)
GetCostAndUsageRequest & AddMetrics(const char *value)
GetCostAndUsageRequest & WithFilter(Expression &&value)
GetCostAndUsageRequest & AddMetrics(Aws::String &&value)
const Aws::Vector< Aws::String > & GetMetrics() const
void SetMetrics(Aws::Vector< Aws::String > &&value)
GetCostAndUsageRequest & WithGranularity(Granularity &&value)
GetCostAndUsageRequest & AddMetrics(const Aws::String &value)
const Aws::Vector< GroupDefinition > & GetGroupBy() const
void SetMetrics(const Aws::Vector< Aws::String > &value)
GetCostAndUsageRequest & WithGroupBy(Aws::Vector< GroupDefinition > &&value)
GetCostAndUsageRequest & WithTimePeriod(DateInterval &&value)
AWS_COSTEXPLORER_API Aws::String SerializePayload() const override
GetCostAndUsageRequest & WithMetrics(Aws::Vector< Aws::String > &&value)
virtual const char * GetServiceRequestName() const override
GetCostAndUsageRequest & WithNextPageToken(const char *value)
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