AWS SDK for C++

AWS SDK for C++ Version 1.11.608

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/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/ce/model/MetricValue.h>
13#include <aws/ce/model/Group.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace CostExplorer
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_COSTEXPLORER_API ResultByTime() = default;
40 AWS_COSTEXPLORER_API ResultByTime(Aws::Utils::Json::JsonView jsonValue);
41 AWS_COSTEXPLORER_API ResultByTime& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_COSTEXPLORER_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
49 inline const DateInterval& GetTimePeriod() const { return m_timePeriod; }
50 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
51 template<typename TimePeriodT = DateInterval>
52 void SetTimePeriod(TimePeriodT&& value) { m_timePeriodHasBeenSet = true; m_timePeriod = std::forward<TimePeriodT>(value); }
53 template<typename TimePeriodT = DateInterval>
54 ResultByTime& WithTimePeriod(TimePeriodT&& value) { SetTimePeriod(std::forward<TimePeriodT>(value)); return *this;}
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) { m_totalHasBeenSet = true; m_total = std::forward<TotalT>(value); }
65 template<typename TotalT = Aws::Map<Aws::String, MetricValue>>
66 ResultByTime& WithTotal(TotalT&& value) { SetTotal(std::forward<TotalT>(value)); return *this;}
67 template<typename TotalKeyT = Aws::String, typename TotalValueT = MetricValue>
68 ResultByTime& AddTotal(TotalKeyT&& key, TotalValueT&& value) {
69 m_totalHasBeenSet = true; m_total.emplace(std::forward<TotalKeyT>(key), std::forward<TotalValueT>(value)); return *this;
70 }
72
74
77 inline const Aws::Vector<Group>& GetGroups() const { return m_groups; }
78 inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; }
79 template<typename GroupsT = Aws::Vector<Group>>
80 void SetGroups(GroupsT&& value) { m_groupsHasBeenSet = true; m_groups = std::forward<GroupsT>(value); }
81 template<typename GroupsT = Aws::Vector<Group>>
82 ResultByTime& WithGroups(GroupsT&& value) { SetGroups(std::forward<GroupsT>(value)); return *this;}
83 template<typename GroupsT = Group>
84 ResultByTime& AddGroups(GroupsT&& value) { m_groupsHasBeenSet = true; m_groups.emplace_back(std::forward<GroupsT>(value)); return *this; }
86
88
91 inline bool GetEstimated() const { return m_estimated; }
92 inline bool EstimatedHasBeenSet() const { return m_estimatedHasBeenSet; }
93 inline void SetEstimated(bool value) { m_estimatedHasBeenSet = true; m_estimated = value; }
94 inline ResultByTime& WithEstimated(bool value) { SetEstimated(value); return *this;}
96 private:
97
98 DateInterval m_timePeriod;
99 bool m_timePeriodHasBeenSet = false;
100
102 bool m_totalHasBeenSet = false;
103
104 Aws::Vector<Group> m_groups;
105 bool m_groupsHasBeenSet = false;
106
107 bool m_estimated{false};
108 bool m_estimatedHasBeenSet = false;
109 };
110
111} // namespace Model
112} // namespace CostExplorer
113} // 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