AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
ResultByTime.h
1
6#pragma once
7#include <aws/ce/CostExplorer_EXPORTS.h>
8#include <aws/ce/model/DateInterval.h>
9#include <aws/ce/model/Group.h>
10#include <aws/ce/model/MetricValue.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace CostExplorer {
25namespace Model {
26
33 public:
34 AWS_COSTEXPLORER_API ResultByTime() = default;
35 AWS_COSTEXPLORER_API ResultByTime(Aws::Utils::Json::JsonView jsonValue);
36 AWS_COSTEXPLORER_API ResultByTime& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const DateInterval& GetTimePeriod() const { return m_timePeriod; }
44 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
45 template <typename TimePeriodT = DateInterval>
46 void SetTimePeriod(TimePeriodT&& value) {
47 m_timePeriodHasBeenSet = true;
48 m_timePeriod = std::forward<TimePeriodT>(value);
49 }
50 template <typename TimePeriodT = DateInterval>
51 ResultByTime& WithTimePeriod(TimePeriodT&& value) {
52 SetTimePeriod(std::forward<TimePeriodT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::Map<Aws::String, MetricValue>& GetTotal() const { return m_total; }
62 inline bool TotalHasBeenSet() const { return m_totalHasBeenSet; }
63 template <typename TotalT = Aws::Map<Aws::String, MetricValue>>
64 void SetTotal(TotalT&& value) {
65 m_totalHasBeenSet = true;
66 m_total = std::forward<TotalT>(value);
67 }
68 template <typename TotalT = Aws::Map<Aws::String, MetricValue>>
69 ResultByTime& WithTotal(TotalT&& value) {
70 SetTotal(std::forward<TotalT>(value));
71 return *this;
72 }
73 template <typename TotalKeyT = Aws::String, typename TotalValueT = MetricValue>
74 ResultByTime& AddTotal(TotalKeyT&& key, TotalValueT&& value) {
75 m_totalHasBeenSet = true;
76 m_total.emplace(std::forward<TotalKeyT>(key), std::forward<TotalValueT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::Vector<Group>& GetGroups() const { return m_groups; }
86 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
87 template <typename GroupsT = Aws::Vector<Group>>
88 void SetGroups(GroupsT&& value) {
89 m_groupsHasBeenSet = true;
90 m_groups = std::forward<GroupsT>(value);
91 }
92 template <typename GroupsT = Aws::Vector<Group>>
93 ResultByTime& WithGroups(GroupsT&& value) {
94 SetGroups(std::forward<GroupsT>(value));
95 return *this;
96 }
97 template <typename GroupsT = Group>
98 ResultByTime& AddGroups(GroupsT&& value) {
99 m_groupsHasBeenSet = true;
100 m_groups.emplace_back(std::forward<GroupsT>(value));
101 return *this;
102 }
104
106
109 inline bool GetEstimated() const { return m_estimated; }
110 inline bool EstimatedHasBeenSet() const { return m_estimatedHasBeenSet; }
111 inline void SetEstimated(bool value) {
112 m_estimatedHasBeenSet = true;
113 m_estimated = value;
114 }
115 inline ResultByTime& WithEstimated(bool value) {
116 SetEstimated(value);
117 return *this;
118 }
120 private:
121 DateInterval m_timePeriod;
122
124
125 Aws::Vector<Group> m_groups;
126
127 bool m_estimated{false};
128 bool m_timePeriodHasBeenSet = false;
129 bool m_totalHasBeenSet = false;
130 bool m_groupsHasBeenSet = false;
131 bool m_estimatedHasBeenSet = false;
132};
133
134} // namespace Model
135} // namespace CostExplorer
136} // namespace Aws
AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const
ResultByTime & WithTimePeriod(TimePeriodT &&value)
void SetTimePeriod(TimePeriodT &&value)
AWS_COSTEXPLORER_API ResultByTime(Aws::Utils::Json::JsonView jsonValue)
ResultByTime & WithTotal(TotalT &&value)
ResultByTime & AddTotal(TotalKeyT &&key, TotalValueT &&value)
ResultByTime & AddGroups(GroupsT &&value)
ResultByTime & WithGroups(GroupsT &&value)
const DateInterval & GetTimePeriod() const
const Aws::Map< Aws::String, MetricValue > & GetTotal() const
const Aws::Vector< Group > & GetGroups() const
ResultByTime & WithEstimated(bool value)
AWS_COSTEXPLORER_API ResultByTime & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_COSTEXPLORER_API ResultByTime()=default
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue