AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
Budget.h
1
6#pragma once
7#include <aws/budgets/Budgets_EXPORTS.h>
8#include <aws/budgets/model/AutoAdjustData.h>
9#include <aws/budgets/model/BudgetType.h>
10#include <aws/budgets/model/CalculatedSpend.h>
11#include <aws/budgets/model/Expression.h>
12#include <aws/budgets/model/HealthStatus.h>
13#include <aws/budgets/model/Metric.h>
14#include <aws/budgets/model/Spend.h>
15#include <aws/budgets/model/TimePeriod.h>
16#include <aws/budgets/model/TimeUnit.h>
17#include <aws/core/utils/DateTime.h>
18#include <aws/core/utils/memory/stl/AWSMap.h>
19#include <aws/core/utils/memory/stl/AWSString.h>
20#include <aws/core/utils/memory/stl/AWSVector.h>
21
22#include <utility>
23
24namespace Aws {
25namespace Utils {
26namespace Json {
27class JsonValue;
28class JsonView;
29} // namespace Json
30} // namespace Utils
31namespace Budgets {
32namespace Model {
33
44class Budget {
45 public:
46 AWS_BUDGETS_API Budget() = default;
47 AWS_BUDGETS_API Budget(Aws::Utils::Json::JsonView jsonValue);
48 AWS_BUDGETS_API Budget& operator=(Aws::Utils::Json::JsonView jsonValue);
49 AWS_BUDGETS_API Aws::Utils::Json::JsonValue Jsonize() const;
50
52
57 inline const Aws::String& GetBudgetName() const { return m_budgetName; }
58 inline bool BudgetNameHasBeenSet() const { return m_budgetNameHasBeenSet; }
59 template <typename BudgetNameT = Aws::String>
60 void SetBudgetName(BudgetNameT&& value) {
61 m_budgetNameHasBeenSet = true;
62 m_budgetName = std::forward<BudgetNameT>(value);
63 }
64 template <typename BudgetNameT = Aws::String>
65 Budget& WithBudgetName(BudgetNameT&& value) {
66 SetBudgetName(std::forward<BudgetNameT>(value));
67 return *this;
68 }
70
72
82 inline const Spend& GetBudgetLimit() const { return m_budgetLimit; }
83 inline bool BudgetLimitHasBeenSet() const { return m_budgetLimitHasBeenSet; }
84 template <typename BudgetLimitT = Spend>
85 void SetBudgetLimit(BudgetLimitT&& value) {
86 m_budgetLimitHasBeenSet = true;
87 m_budgetLimit = std::forward<BudgetLimitT>(value);
88 }
89 template <typename BudgetLimitT = Spend>
90 Budget& WithBudgetLimit(BudgetLimitT&& value) {
91 SetBudgetLimit(std::forward<BudgetLimitT>(value));
92 return *this;
93 }
95
97
125 inline const Aws::Map<Aws::String, Spend>& GetPlannedBudgetLimits() const { return m_plannedBudgetLimits; }
126 inline bool PlannedBudgetLimitsHasBeenSet() const { return m_plannedBudgetLimitsHasBeenSet; }
127 template <typename PlannedBudgetLimitsT = Aws::Map<Aws::String, Spend>>
128 void SetPlannedBudgetLimits(PlannedBudgetLimitsT&& value) {
129 m_plannedBudgetLimitsHasBeenSet = true;
130 m_plannedBudgetLimits = std::forward<PlannedBudgetLimitsT>(value);
131 }
132 template <typename PlannedBudgetLimitsT = Aws::Map<Aws::String, Spend>>
133 Budget& WithPlannedBudgetLimits(PlannedBudgetLimitsT&& value) {
134 SetPlannedBudgetLimits(std::forward<PlannedBudgetLimitsT>(value));
135 return *this;
136 }
137 template <typename PlannedBudgetLimitsKeyT = Aws::String, typename PlannedBudgetLimitsValueT = Spend>
138 Budget& AddPlannedBudgetLimits(PlannedBudgetLimitsKeyT&& key, PlannedBudgetLimitsValueT&& value) {
139 m_plannedBudgetLimitsHasBeenSet = true;
140 m_plannedBudgetLimits.emplace(std::forward<PlannedBudgetLimitsKeyT>(key), std::forward<PlannedBudgetLimitsValueT>(value));
141 return *this;
142 }
144
146
149 inline TimeUnit GetTimeUnit() const { return m_timeUnit; }
150 inline bool TimeUnitHasBeenSet() const { return m_timeUnitHasBeenSet; }
151 inline void SetTimeUnit(TimeUnit value) {
152 m_timeUnitHasBeenSet = true;
153 m_timeUnit = value;
154 }
155 inline Budget& WithTimeUnit(TimeUnit value) {
156 SetTimeUnit(value);
157 return *this;
158 }
160
162
179 inline const TimePeriod& GetTimePeriod() const { return m_timePeriod; }
180 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
181 template <typename TimePeriodT = TimePeriod>
182 void SetTimePeriod(TimePeriodT&& value) {
183 m_timePeriodHasBeenSet = true;
184 m_timePeriod = std::forward<TimePeriodT>(value);
185 }
186 template <typename TimePeriodT = TimePeriod>
187 Budget& WithTimePeriod(TimePeriodT&& value) {
188 SetTimePeriod(std::forward<TimePeriodT>(value));
189 return *this;
190 }
192
194
197 inline const CalculatedSpend& GetCalculatedSpend() const { return m_calculatedSpend; }
198 inline bool CalculatedSpendHasBeenSet() const { return m_calculatedSpendHasBeenSet; }
199 template <typename CalculatedSpendT = CalculatedSpend>
200 void SetCalculatedSpend(CalculatedSpendT&& value) {
201 m_calculatedSpendHasBeenSet = true;
202 m_calculatedSpend = std::forward<CalculatedSpendT>(value);
203 }
204 template <typename CalculatedSpendT = CalculatedSpend>
205 Budget& WithCalculatedSpend(CalculatedSpendT&& value) {
206 SetCalculatedSpend(std::forward<CalculatedSpendT>(value));
207 return *this;
208 }
210
212
216 inline BudgetType GetBudgetType() const { return m_budgetType; }
217 inline bool BudgetTypeHasBeenSet() const { return m_budgetTypeHasBeenSet; }
218 inline void SetBudgetType(BudgetType value) {
219 m_budgetTypeHasBeenSet = true;
220 m_budgetType = value;
221 }
223 SetBudgetType(value);
224 return *this;
225 }
227
229
232 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
233 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
234 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
235 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
236 m_lastUpdatedTimeHasBeenSet = true;
237 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
238 }
239 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
240 Budget& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
241 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
242 return *this;
243 }
245
247
251 inline const AutoAdjustData& GetAutoAdjustData() const { return m_autoAdjustData; }
252 inline bool AutoAdjustDataHasBeenSet() const { return m_autoAdjustDataHasBeenSet; }
253 template <typename AutoAdjustDataT = AutoAdjustData>
254 void SetAutoAdjustData(AutoAdjustDataT&& value) {
255 m_autoAdjustDataHasBeenSet = true;
256 m_autoAdjustData = std::forward<AutoAdjustDataT>(value);
257 }
258 template <typename AutoAdjustDataT = AutoAdjustData>
259 Budget& WithAutoAdjustData(AutoAdjustDataT&& value) {
260 SetAutoAdjustData(std::forward<AutoAdjustDataT>(value));
261 return *this;
262 }
264
266
269 inline const Expression& GetFilterExpression() const { return m_filterExpression; }
270 inline bool FilterExpressionHasBeenSet() const { return m_filterExpressionHasBeenSet; }
271 template <typename FilterExpressionT = Expression>
272 void SetFilterExpression(FilterExpressionT&& value) {
273 m_filterExpressionHasBeenSet = true;
274 m_filterExpression = std::forward<FilterExpressionT>(value);
275 }
276 template <typename FilterExpressionT = Expression>
277 Budget& WithFilterExpression(FilterExpressionT&& value) {
278 SetFilterExpression(std::forward<FilterExpressionT>(value));
279 return *this;
280 }
282
284
287 inline const Aws::Vector<Metric>& GetMetrics() const { return m_metrics; }
288 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
289 template <typename MetricsT = Aws::Vector<Metric>>
290 void SetMetrics(MetricsT&& value) {
291 m_metricsHasBeenSet = true;
292 m_metrics = std::forward<MetricsT>(value);
293 }
294 template <typename MetricsT = Aws::Vector<Metric>>
295 Budget& WithMetrics(MetricsT&& value) {
296 SetMetrics(std::forward<MetricsT>(value));
297 return *this;
298 }
299 inline Budget& AddMetrics(Metric value) {
300 m_metricsHasBeenSet = true;
301 m_metrics.push_back(value);
302 return *this;
303 }
305
307
314 inline const Aws::String& GetBillingViewArn() const { return m_billingViewArn; }
315 inline bool BillingViewArnHasBeenSet() const { return m_billingViewArnHasBeenSet; }
316 template <typename BillingViewArnT = Aws::String>
317 void SetBillingViewArn(BillingViewArnT&& value) {
318 m_billingViewArnHasBeenSet = true;
319 m_billingViewArn = std::forward<BillingViewArnT>(value);
320 }
321 template <typename BillingViewArnT = Aws::String>
322 Budget& WithBillingViewArn(BillingViewArnT&& value) {
323 SetBillingViewArn(std::forward<BillingViewArnT>(value));
324 return *this;
325 }
327
329
332 inline const HealthStatus& GetHealthStatus() const { return m_healthStatus; }
333 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
334 template <typename HealthStatusT = HealthStatus>
335 void SetHealthStatus(HealthStatusT&& value) {
336 m_healthStatusHasBeenSet = true;
337 m_healthStatus = std::forward<HealthStatusT>(value);
338 }
339 template <typename HealthStatusT = HealthStatus>
340 Budget& WithHealthStatus(HealthStatusT&& value) {
341 SetHealthStatus(std::forward<HealthStatusT>(value));
342 return *this;
343 }
345 private:
346 Aws::String m_budgetName;
347
348 Spend m_budgetLimit;
349
350 Aws::Map<Aws::String, Spend> m_plannedBudgetLimits;
351
352 TimeUnit m_timeUnit{TimeUnit::NOT_SET};
353
354 TimePeriod m_timePeriod;
355
356 CalculatedSpend m_calculatedSpend;
357
358 BudgetType m_budgetType{BudgetType::NOT_SET};
359
360 Aws::Utils::DateTime m_lastUpdatedTime{};
361
362 AutoAdjustData m_autoAdjustData;
363
364 Expression m_filterExpression;
365
366 Aws::Vector<Metric> m_metrics;
367
368 Aws::String m_billingViewArn;
369
370 HealthStatus m_healthStatus;
371 bool m_budgetNameHasBeenSet = false;
372 bool m_budgetLimitHasBeenSet = false;
373 bool m_plannedBudgetLimitsHasBeenSet = false;
374 bool m_timeUnitHasBeenSet = false;
375 bool m_timePeriodHasBeenSet = false;
376 bool m_calculatedSpendHasBeenSet = false;
377 bool m_budgetTypeHasBeenSet = false;
378 bool m_lastUpdatedTimeHasBeenSet = false;
379 bool m_autoAdjustDataHasBeenSet = false;
380 bool m_filterExpressionHasBeenSet = false;
381 bool m_metricsHasBeenSet = false;
382 bool m_billingViewArnHasBeenSet = false;
383 bool m_healthStatusHasBeenSet = false;
384};
385
386} // namespace Model
387} // namespace Budgets
388} // namespace Aws
Budget & AddMetrics(Metric value)
Definition Budget.h:299
Budget & WithLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Budget.h:240
const TimePeriod & GetTimePeriod() const
Definition Budget.h:179
bool PlannedBudgetLimitsHasBeenSet() const
Definition Budget.h:126
const Aws::Map< Aws::String, Spend > & GetPlannedBudgetLimits() const
Definition Budget.h:125
TimeUnit GetTimeUnit() const
Definition Budget.h:149
Budget & WithCalculatedSpend(CalculatedSpendT &&value)
Definition Budget.h:205
Budget & WithHealthStatus(HealthStatusT &&value)
Definition Budget.h:340
bool TimeUnitHasBeenSet() const
Definition Budget.h:150
bool LastUpdatedTimeHasBeenSet() const
Definition Budget.h:233
const AutoAdjustData & GetAutoAdjustData() const
Definition Budget.h:251
const Spend & GetBudgetLimit() const
Definition Budget.h:82
void SetBillingViewArn(BillingViewArnT &&value)
Definition Budget.h:317
void SetAutoAdjustData(AutoAdjustDataT &&value)
Definition Budget.h:254
AWS_BUDGETS_API Budget & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetBudgetName() const
Definition Budget.h:57
const CalculatedSpend & GetCalculatedSpend() const
Definition Budget.h:197
AWS_BUDGETS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetBillingViewArn() const
Definition Budget.h:314
const Aws::Vector< Metric > & GetMetrics() const
Definition Budget.h:287
bool AutoAdjustDataHasBeenSet() const
Definition Budget.h:252
Budget & WithTimeUnit(TimeUnit value)
Definition Budget.h:155
AWS_BUDGETS_API Budget()=default
bool BillingViewArnHasBeenSet() const
Definition Budget.h:315
Budget & WithBillingViewArn(BillingViewArnT &&value)
Definition Budget.h:322
Budget & WithBudgetName(BudgetNameT &&value)
Definition Budget.h:65
AWS_BUDGETS_API Budget(Aws::Utils::Json::JsonView jsonValue)
bool BudgetNameHasBeenSet() const
Definition Budget.h:58
void SetMetrics(MetricsT &&value)
Definition Budget.h:290
Budget & WithAutoAdjustData(AutoAdjustDataT &&value)
Definition Budget.h:259
Budget & WithTimePeriod(TimePeriodT &&value)
Definition Budget.h:187
Budget & WithBudgetType(BudgetType value)
Definition Budget.h:222
void SetBudgetLimit(BudgetLimitT &&value)
Definition Budget.h:85
bool MetricsHasBeenSet() const
Definition Budget.h:288
bool FilterExpressionHasBeenSet() const
Definition Budget.h:270
const HealthStatus & GetHealthStatus() const
Definition Budget.h:332
const Expression & GetFilterExpression() const
Definition Budget.h:269
bool CalculatedSpendHasBeenSet() const
Definition Budget.h:198
void SetBudgetName(BudgetNameT &&value)
Definition Budget.h:60
bool BudgetTypeHasBeenSet() const
Definition Budget.h:217
Budget & WithPlannedBudgetLimits(PlannedBudgetLimitsT &&value)
Definition Budget.h:133
Budget & WithFilterExpression(FilterExpressionT &&value)
Definition Budget.h:277
Budget & WithBudgetLimit(BudgetLimitT &&value)
Definition Budget.h:90
bool TimePeriodHasBeenSet() const
Definition Budget.h:180
void SetHealthStatus(HealthStatusT &&value)
Definition Budget.h:335
void SetPlannedBudgetLimits(PlannedBudgetLimitsT &&value)
Definition Budget.h:128
void SetCalculatedSpend(CalculatedSpendT &&value)
Definition Budget.h:200
Budget & WithMetrics(MetricsT &&value)
Definition Budget.h:295
BudgetType GetBudgetType() const
Definition Budget.h:216
void SetBudgetType(BudgetType value)
Definition Budget.h:218
void SetTimePeriod(TimePeriodT &&value)
Definition Budget.h:182
void SetFilterExpression(FilterExpressionT &&value)
Definition Budget.h:272
bool BudgetLimitHasBeenSet() const
Definition Budget.h:83
bool HealthStatusHasBeenSet() const
Definition Budget.h:333
void SetTimeUnit(TimeUnit value)
Definition Budget.h:151
Budget & AddPlannedBudgetLimits(PlannedBudgetLimitsKeyT &&key, PlannedBudgetLimitsValueT &&value)
Definition Budget.h:138
const Aws::Utils::DateTime & GetLastUpdatedTime() const
Definition Budget.h:232
void SetLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Budget.h:235
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue