AWS SDK for C++  1.9.1
AWS SDK for C++
GetCostAndUsageRequest.h
Go to the documentation of this file.
1 
6 #pragma once
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace CostExplorer
20 {
21 namespace Model
22 {
23 
27  {
28  public:
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::String SerializePayload() const override;
38 
40 
41 
49  inline const DateInterval& GetTimePeriod() const{ return m_timePeriod; }
50 
58  inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
59 
67  inline void SetTimePeriod(const DateInterval& value) { m_timePeriodHasBeenSet = true; m_timePeriod = value; }
68 
76  inline void SetTimePeriod(DateInterval&& value) { m_timePeriodHasBeenSet = true; m_timePeriod = std::move(value); }
77 
85  inline GetCostAndUsageRequest& WithTimePeriod(const DateInterval& value) { SetTimePeriod(value); return *this;}
86 
94  inline GetCostAndUsageRequest& WithTimePeriod(DateInterval&& value) { SetTimePeriod(std::move(value)); return *this;}
95 
96 
103  inline const Granularity& GetGranularity() const{ return m_granularity; }
104 
111  inline bool GranularityHasBeenSet() const { return m_granularityHasBeenSet; }
112 
119  inline void SetGranularity(const Granularity& value) { m_granularityHasBeenSet = true; m_granularity = value; }
120 
127  inline void SetGranularity(Granularity&& value) { m_granularityHasBeenSet = true; m_granularity = std::move(value); }
128 
135  inline GetCostAndUsageRequest& WithGranularity(const Granularity& value) { SetGranularity(value); return *this;}
136 
143  inline GetCostAndUsageRequest& WithGranularity(Granularity&& value) { SetGranularity(std::move(value)); return *this;}
144 
145 
155  inline const Expression& GetFilter() const{ return m_filter; }
156 
166  inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
167 
177  inline void SetFilter(const Expression& value) { m_filterHasBeenSet = true; m_filter = value; }
178 
188  inline void SetFilter(Expression&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); }
189 
199  inline GetCostAndUsageRequest& WithFilter(const Expression& value) { SetFilter(value); return *this;}
200 
210  inline GetCostAndUsageRequest& WithFilter(Expression&& value) { SetFilter(std::move(value)); return *this;}
211 
212 
231  inline const Aws::Vector<Aws::String>& GetMetrics() const{ return m_metrics; }
232 
251  inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
252 
271  inline void SetMetrics(const Aws::Vector<Aws::String>& value) { m_metricsHasBeenSet = true; m_metrics = value; }
272 
291  inline void SetMetrics(Aws::Vector<Aws::String>&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); }
292 
311  inline GetCostAndUsageRequest& WithMetrics(const Aws::Vector<Aws::String>& value) { SetMetrics(value); return *this;}
312 
331  inline GetCostAndUsageRequest& WithMetrics(Aws::Vector<Aws::String>&& value) { SetMetrics(std::move(value)); return *this;}
332 
351  inline GetCostAndUsageRequest& AddMetrics(const Aws::String& value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; }
352 
371  inline GetCostAndUsageRequest& AddMetrics(Aws::String&& value) { m_metricsHasBeenSet = true; m_metrics.push_back(std::move(value)); return *this; }
372 
391  inline GetCostAndUsageRequest& AddMetrics(const char* value) { m_metricsHasBeenSet = true; m_metrics.push_back(value); return *this; }
392 
393 
403  inline const Aws::Vector<GroupDefinition>& GetGroupBy() const{ return m_groupBy; }
404 
414  inline bool GroupByHasBeenSet() const { return m_groupByHasBeenSet; }
415 
425  inline void SetGroupBy(const Aws::Vector<GroupDefinition>& value) { m_groupByHasBeenSet = true; m_groupBy = value; }
426 
436  inline void SetGroupBy(Aws::Vector<GroupDefinition>&& value) { m_groupByHasBeenSet = true; m_groupBy = std::move(value); }
437 
447  inline GetCostAndUsageRequest& WithGroupBy(const Aws::Vector<GroupDefinition>& value) { SetGroupBy(value); return *this;}
448 
458  inline GetCostAndUsageRequest& WithGroupBy(Aws::Vector<GroupDefinition>&& value) { SetGroupBy(std::move(value)); return *this;}
459 
469  inline GetCostAndUsageRequest& AddGroupBy(const GroupDefinition& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(value); return *this; }
470 
480  inline GetCostAndUsageRequest& AddGroupBy(GroupDefinition&& value) { m_groupByHasBeenSet = true; m_groupBy.push_back(std::move(value)); return *this; }
481 
482 
488  inline const Aws::String& GetNextPageToken() const{ return m_nextPageToken; }
489 
495  inline bool NextPageTokenHasBeenSet() const { return m_nextPageTokenHasBeenSet; }
496 
502  inline void SetNextPageToken(const Aws::String& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = value; }
503 
509  inline void SetNextPageToken(Aws::String&& value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken = std::move(value); }
510 
516  inline void SetNextPageToken(const char* value) { m_nextPageTokenHasBeenSet = true; m_nextPageToken.assign(value); }
517 
523  inline GetCostAndUsageRequest& WithNextPageToken(const Aws::String& value) { SetNextPageToken(value); return *this;}
524 
530  inline GetCostAndUsageRequest& WithNextPageToken(Aws::String&& value) { SetNextPageToken(std::move(value)); return *this;}
531 
537  inline GetCostAndUsageRequest& WithNextPageToken(const char* value) { SetNextPageToken(value); return *this;}
538 
539  private:
540 
541  DateInterval m_timePeriod;
542  bool m_timePeriodHasBeenSet;
543 
544  Granularity m_granularity;
545  bool m_granularityHasBeenSet;
546 
547  Expression m_filter;
548  bool m_filterHasBeenSet;
549 
550  Aws::Vector<Aws::String> m_metrics;
551  bool m_metricsHasBeenSet;
552 
554  bool m_groupByHasBeenSet;
555 
556  Aws::String m_nextPageToken;
557  bool m_nextPageTokenHasBeenSet;
558  };
559 
560 } // namespace Model
561 } // namespace CostExplorer
562 } // namespace Aws
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetGranularity
const Granularity & GetGranularity() const
Definition: GetCostAndUsageRequest.h:103
Aws::CostExplorer::CostExplorerRequest
Definition: CostExplorerRequest.h:17
Aws::CostExplorer::Model::DateInterval
Definition: DateInterval.h:32
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithFilter
GetCostAndUsageRequest & WithFilter(const Expression &value)
Definition: GetCostAndUsageRequest.h:199
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithGroupBy
GetCostAndUsageRequest & WithGroupBy(const Aws::Vector< GroupDefinition > &value)
Definition: GetCostAndUsageRequest.h:447
Aws::CostExplorer::Model::Granularity
Granularity
Definition: Granularity.h:17
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithGranularity
GetCostAndUsageRequest & WithGranularity(const Granularity &value)
Definition: GetCostAndUsageRequest.h:135
Aws::CostExplorer::Model::GetCostAndUsageRequest::GroupByHasBeenSet
bool GroupByHasBeenSet() const
Definition: GetCostAndUsageRequest.h:414
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithMetrics
GetCostAndUsageRequest & WithMetrics(Aws::Vector< Aws::String > &&value)
Definition: GetCostAndUsageRequest.h:331
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetGranularity
void SetGranularity(const Granularity &value)
Definition: GetCostAndUsageRequest.h:119
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetMetrics
void SetMetrics(Aws::Vector< Aws::String > &&value)
Definition: GetCostAndUsageRequest.h:291
Aws::CostExplorer::Model::GetCostAndUsageRequest::GranularityHasBeenSet
bool GranularityHasBeenSet() const
Definition: GetCostAndUsageRequest.h:111
CostExplorerRequest.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetFilter
const Expression & GetFilter() const
Definition: GetCostAndUsageRequest.h:155
DateInterval.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetTimePeriod
const DateInterval & GetTimePeriod() const
Definition: GetCostAndUsageRequest.h:49
Aws::CostExplorer::Model::Expression
Definition: Expression.h:69
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::CostExplorer::Model::GetCostAndUsageRequest::NextPageTokenHasBeenSet
bool NextPageTokenHasBeenSet() const
Definition: GetCostAndUsageRequest.h:495
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithNextPageToken
GetCostAndUsageRequest & WithNextPageToken(const char *value)
Definition: GetCostAndUsageRequest.h:537
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetGroupBy
void SetGroupBy(Aws::Vector< GroupDefinition > &&value)
Definition: GetCostAndUsageRequest.h:436
AWSVector.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::AddGroupBy
GetCostAndUsageRequest & AddGroupBy(const GroupDefinition &value)
Definition: GetCostAndUsageRequest.h:469
Aws::CostExplorer::Model::GetCostAndUsageRequest::AddMetrics
GetCostAndUsageRequest & AddMetrics(Aws::String &&value)
Definition: GetCostAndUsageRequest.h:371
Aws::CostExplorer::Model::GetCostAndUsageRequest::AddMetrics
GetCostAndUsageRequest & AddMetrics(const char *value)
Definition: GetCostAndUsageRequest.h:391
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithGroupBy
GetCostAndUsageRequest & WithGroupBy(Aws::Vector< GroupDefinition > &&value)
Definition: GetCostAndUsageRequest.h:458
Aws::CostExplorer::Model::GroupDefinition
Definition: GroupDefinition.h:34
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetNextPageToken
const Aws::String & GetNextPageToken() const
Definition: GetCostAndUsageRequest.h:488
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithNextPageToken
GetCostAndUsageRequest & WithNextPageToken(Aws::String &&value)
Definition: GetCostAndUsageRequest.h:530
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithNextPageToken
GetCostAndUsageRequest & WithNextPageToken(const Aws::String &value)
Definition: GetCostAndUsageRequest.h:523
CostExplorer_EXPORTS.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetNextPageToken
void SetNextPageToken(Aws::String &&value)
Definition: GetCostAndUsageRequest.h:509
Aws::CostExplorer::Model::GetCostAndUsageRequest
Definition: GetCostAndUsageRequest.h:27
Aws::CostExplorer::Model::GetCostAndUsageRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithMetrics
GetCostAndUsageRequest & WithMetrics(const Aws::Vector< Aws::String > &value)
Definition: GetCostAndUsageRequest.h:311
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetTimePeriod
void SetTimePeriod(DateInterval &&value)
Definition: GetCostAndUsageRequest.h:76
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithGranularity
GetCostAndUsageRequest & WithGranularity(Granularity &&value)
Definition: GetCostAndUsageRequest.h:143
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetNextPageToken
void SetNextPageToken(const Aws::String &value)
Definition: GetCostAndUsageRequest.h:502
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetGranularity
void SetGranularity(Granularity &&value)
Definition: GetCostAndUsageRequest.h:127
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetGroupBy
void SetGroupBy(const Aws::Vector< GroupDefinition > &value)
Definition: GetCostAndUsageRequest.h:425
AWSString.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: GetCostAndUsageRequest.h:35
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetGroupBy
const Aws::Vector< GroupDefinition > & GetGroupBy() const
Definition: GetCostAndUsageRequest.h:403
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetMetrics
void SetMetrics(const Aws::Vector< Aws::String > &value)
Definition: GetCostAndUsageRequest.h:271
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetNextPageToken
void SetNextPageToken(const char *value)
Definition: GetCostAndUsageRequest.h:516
AWS_COSTEXPLORER_API
#define AWS_COSTEXPLORER_API
Definition: CostExplorer_EXPORTS.h:28
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithFilter
GetCostAndUsageRequest & WithFilter(Expression &&value)
Definition: GetCostAndUsageRequest.h:210
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetMetrics
const Aws::Vector< Aws::String > & GetMetrics() const
Definition: GetCostAndUsageRequest.h:231
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithTimePeriod
GetCostAndUsageRequest & WithTimePeriod(const DateInterval &value)
Definition: GetCostAndUsageRequest.h:85
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::CostExplorer::Model::GetCostAndUsageRequest::AddGroupBy
GetCostAndUsageRequest & AddGroupBy(GroupDefinition &&value)
Definition: GetCostAndUsageRequest.h:480
Aws::CostExplorer::Model::GetCostAndUsageRequest::MetricsHasBeenSet
bool MetricsHasBeenSet() const
Definition: GetCostAndUsageRequest.h:251
Aws
Definition: AccessManagementClient.h:15
Aws::CostExplorer::Model::GetCostAndUsageRequest::AddMetrics
GetCostAndUsageRequest & AddMetrics(const Aws::String &value)
Definition: GetCostAndUsageRequest.h:351
GroupDefinition.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::FilterHasBeenSet
bool FilterHasBeenSet() const
Definition: GetCostAndUsageRequest.h:166
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetFilter
void SetFilter(const Expression &value)
Definition: GetCostAndUsageRequest.h:177
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::CostExplorer::Model::GetCostAndUsageRequest::GetCostAndUsageRequest
GetCostAndUsageRequest()
Aws::CostExplorer::Model::GetCostAndUsageRequest::WithTimePeriod
GetCostAndUsageRequest & WithTimePeriod(DateInterval &&value)
Definition: GetCostAndUsageRequest.h:94
Expression.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetTimePeriod
void SetTimePeriod(const DateInterval &value)
Definition: GetCostAndUsageRequest.h:67
Aws::CostExplorer::Model::GetCostAndUsageRequest::TimePeriodHasBeenSet
bool TimePeriodHasBeenSet() const
Definition: GetCostAndUsageRequest.h:58
Granularity.h
Aws::CostExplorer::Model::GetCostAndUsageRequest::SetFilter
void SetFilter(Expression &&value)
Definition: GetCostAndUsageRequest.h:188