AWS SDK for C++

AWS SDK for C++ Version 1.11.816

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
59 inline const Aws::String& GetBudgetName() const { return m_budgetName; }
60 inline bool BudgetNameHasBeenSet() const { return m_budgetNameHasBeenSet; }
61 template <typename BudgetNameT = Aws::String>
62 void SetBudgetName(BudgetNameT&& value) {
63 m_budgetNameHasBeenSet = true;
64 m_budgetName = std::forward<BudgetNameT>(value);
65 }
66 template <typename BudgetNameT = Aws::String>
67 Budget& WithBudgetName(BudgetNameT&& value) {
68 SetBudgetName(std::forward<BudgetNameT>(value));
69 return *this;
70 }
72
74
84 inline const Spend& GetBudgetLimit() const { return m_budgetLimit; }
85 inline bool BudgetLimitHasBeenSet() const { return m_budgetLimitHasBeenSet; }
86 template <typename BudgetLimitT = Spend>
87 void SetBudgetLimit(BudgetLimitT&& value) {
88 m_budgetLimitHasBeenSet = true;
89 m_budgetLimit = std::forward<BudgetLimitT>(value);
90 }
91 template <typename BudgetLimitT = Spend>
92 Budget& WithBudgetLimit(BudgetLimitT&& value) {
93 SetBudgetLimit(std::forward<BudgetLimitT>(value));
94 return *this;
95 }
97
99
127 inline const Aws::Map<Aws::String, Spend>& GetPlannedBudgetLimits() const { return m_plannedBudgetLimits; }
128 inline bool PlannedBudgetLimitsHasBeenSet() const { return m_plannedBudgetLimitsHasBeenSet; }
129 template <typename PlannedBudgetLimitsT = Aws::Map<Aws::String, Spend>>
130 void SetPlannedBudgetLimits(PlannedBudgetLimitsT&& value) {
131 m_plannedBudgetLimitsHasBeenSet = true;
132 m_plannedBudgetLimits = std::forward<PlannedBudgetLimitsT>(value);
133 }
134 template <typename PlannedBudgetLimitsT = Aws::Map<Aws::String, Spend>>
135 Budget& WithPlannedBudgetLimits(PlannedBudgetLimitsT&& value) {
136 SetPlannedBudgetLimits(std::forward<PlannedBudgetLimitsT>(value));
137 return *this;
138 }
139 template <typename PlannedBudgetLimitsKeyT = Aws::String, typename PlannedBudgetLimitsValueT = Spend>
140 Budget& AddPlannedBudgetLimits(PlannedBudgetLimitsKeyT&& key, PlannedBudgetLimitsValueT&& value) {
141 m_plannedBudgetLimitsHasBeenSet = true;
142 m_plannedBudgetLimits.emplace(std::forward<PlannedBudgetLimitsKeyT>(key), std::forward<PlannedBudgetLimitsValueT>(value));
143 return *this;
144 }
146
148
151 inline TimeUnit GetTimeUnit() const { return m_timeUnit; }
152 inline bool TimeUnitHasBeenSet() const { return m_timeUnitHasBeenSet; }
153 inline void SetTimeUnit(TimeUnit value) {
154 m_timeUnitHasBeenSet = true;
155 m_timeUnit = value;
156 }
157 inline Budget& WithTimeUnit(TimeUnit value) {
158 SetTimeUnit(value);
159 return *this;
160 }
162
164
181 inline const TimePeriod& GetTimePeriod() const { return m_timePeriod; }
182 inline bool TimePeriodHasBeenSet() const { return m_timePeriodHasBeenSet; }
183 template <typename TimePeriodT = TimePeriod>
184 void SetTimePeriod(TimePeriodT&& value) {
185 m_timePeriodHasBeenSet = true;
186 m_timePeriod = std::forward<TimePeriodT>(value);
187 }
188 template <typename TimePeriodT = TimePeriod>
189 Budget& WithTimePeriod(TimePeriodT&& value) {
190 SetTimePeriod(std::forward<TimePeriodT>(value));
191 return *this;
192 }
194
196
199 inline const CalculatedSpend& GetCalculatedSpend() const { return m_calculatedSpend; }
200 inline bool CalculatedSpendHasBeenSet() const { return m_calculatedSpendHasBeenSet; }
201 template <typename CalculatedSpendT = CalculatedSpend>
202 void SetCalculatedSpend(CalculatedSpendT&& value) {
203 m_calculatedSpendHasBeenSet = true;
204 m_calculatedSpend = std::forward<CalculatedSpendT>(value);
205 }
206 template <typename CalculatedSpendT = CalculatedSpend>
207 Budget& WithCalculatedSpend(CalculatedSpendT&& value) {
208 SetCalculatedSpend(std::forward<CalculatedSpendT>(value));
209 return *this;
210 }
212
214
218 inline BudgetType GetBudgetType() const { return m_budgetType; }
219 inline bool BudgetTypeHasBeenSet() const { return m_budgetTypeHasBeenSet; }
220 inline void SetBudgetType(BudgetType value) {
221 m_budgetTypeHasBeenSet = true;
222 m_budgetType = value;
223 }
225 SetBudgetType(value);
226 return *this;
227 }
229
231
234 inline const Aws::Utils::DateTime& GetLastUpdatedTime() const { return m_lastUpdatedTime; }
235 inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }
236 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
237 void SetLastUpdatedTime(LastUpdatedTimeT&& value) {
238 m_lastUpdatedTimeHasBeenSet = true;
239 m_lastUpdatedTime = std::forward<LastUpdatedTimeT>(value);
240 }
241 template <typename LastUpdatedTimeT = Aws::Utils::DateTime>
242 Budget& WithLastUpdatedTime(LastUpdatedTimeT&& value) {
243 SetLastUpdatedTime(std::forward<LastUpdatedTimeT>(value));
244 return *this;
245 }
247
249
253 inline const AutoAdjustData& GetAutoAdjustData() const { return m_autoAdjustData; }
254 inline bool AutoAdjustDataHasBeenSet() const { return m_autoAdjustDataHasBeenSet; }
255 template <typename AutoAdjustDataT = AutoAdjustData>
256 void SetAutoAdjustData(AutoAdjustDataT&& value) {
257 m_autoAdjustDataHasBeenSet = true;
258 m_autoAdjustData = std::forward<AutoAdjustDataT>(value);
259 }
260 template <typename AutoAdjustDataT = AutoAdjustData>
261 Budget& WithAutoAdjustData(AutoAdjustDataT&& value) {
262 SetAutoAdjustData(std::forward<AutoAdjustDataT>(value));
263 return *this;
264 }
266
268
271 inline const Expression& GetFilterExpression() const { return m_filterExpression; }
272 inline bool FilterExpressionHasBeenSet() const { return m_filterExpressionHasBeenSet; }
273 template <typename FilterExpressionT = Expression>
274 void SetFilterExpression(FilterExpressionT&& value) {
275 m_filterExpressionHasBeenSet = true;
276 m_filterExpression = std::forward<FilterExpressionT>(value);
277 }
278 template <typename FilterExpressionT = Expression>
279 Budget& WithFilterExpression(FilterExpressionT&& value) {
280 SetFilterExpression(std::forward<FilterExpressionT>(value));
281 return *this;
282 }
284
286
289 inline const Aws::Vector<Metric>& GetMetrics() const { return m_metrics; }
290 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
291 template <typename MetricsT = Aws::Vector<Metric>>
292 void SetMetrics(MetricsT&& value) {
293 m_metricsHasBeenSet = true;
294 m_metrics = std::forward<MetricsT>(value);
295 }
296 template <typename MetricsT = Aws::Vector<Metric>>
297 Budget& WithMetrics(MetricsT&& value) {
298 SetMetrics(std::forward<MetricsT>(value));
299 return *this;
300 }
301 inline Budget& AddMetrics(Metric value) {
302 m_metricsHasBeenSet = true;
303 m_metrics.push_back(value);
304 return *this;
305 }
307
309
316 inline const Aws::String& GetBillingViewArn() const { return m_billingViewArn; }
317 inline bool BillingViewArnHasBeenSet() const { return m_billingViewArnHasBeenSet; }
318 template <typename BillingViewArnT = Aws::String>
319 void SetBillingViewArn(BillingViewArnT&& value) {
320 m_billingViewArnHasBeenSet = true;
321 m_billingViewArn = std::forward<BillingViewArnT>(value);
322 }
323 template <typename BillingViewArnT = Aws::String>
324 Budget& WithBillingViewArn(BillingViewArnT&& value) {
325 SetBillingViewArn(std::forward<BillingViewArnT>(value));
326 return *this;
327 }
329
331
334 inline const HealthStatus& GetHealthStatus() const { return m_healthStatus; }
335 inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; }
336 template <typename HealthStatusT = HealthStatus>
337 void SetHealthStatus(HealthStatusT&& value) {
338 m_healthStatusHasBeenSet = true;
339 m_healthStatus = std::forward<HealthStatusT>(value);
340 }
341 template <typename HealthStatusT = HealthStatus>
342 Budget& WithHealthStatus(HealthStatusT&& value) {
343 SetHealthStatus(std::forward<HealthStatusT>(value));
344 return *this;
345 }
347 private:
348 Aws::String m_budgetName;
349
350 Spend m_budgetLimit;
351
352 Aws::Map<Aws::String, Spend> m_plannedBudgetLimits;
353
354 TimeUnit m_timeUnit{TimeUnit::NOT_SET};
355
356 TimePeriod m_timePeriod;
357
358 CalculatedSpend m_calculatedSpend;
359
360 BudgetType m_budgetType{BudgetType::NOT_SET};
361
362 Aws::Utils::DateTime m_lastUpdatedTime{};
363
364 AutoAdjustData m_autoAdjustData;
365
366 Expression m_filterExpression;
367
368 Aws::Vector<Metric> m_metrics;
369
370 Aws::String m_billingViewArn;
371
372 HealthStatus m_healthStatus;
373 bool m_budgetNameHasBeenSet = false;
374 bool m_budgetLimitHasBeenSet = false;
375 bool m_plannedBudgetLimitsHasBeenSet = false;
376 bool m_timeUnitHasBeenSet = false;
377 bool m_timePeriodHasBeenSet = false;
378 bool m_calculatedSpendHasBeenSet = false;
379 bool m_budgetTypeHasBeenSet = false;
380 bool m_lastUpdatedTimeHasBeenSet = false;
381 bool m_autoAdjustDataHasBeenSet = false;
382 bool m_filterExpressionHasBeenSet = false;
383 bool m_metricsHasBeenSet = false;
384 bool m_billingViewArnHasBeenSet = false;
385 bool m_healthStatusHasBeenSet = false;
386};
387
388} // namespace Model
389} // namespace Budgets
390} // namespace Aws
Budget & AddMetrics(Metric value)
Definition Budget.h:301
Budget & WithLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Budget.h:242
const TimePeriod & GetTimePeriod() const
Definition Budget.h:181
bool PlannedBudgetLimitsHasBeenSet() const
Definition Budget.h:128
const Aws::Map< Aws::String, Spend > & GetPlannedBudgetLimits() const
Definition Budget.h:127
TimeUnit GetTimeUnit() const
Definition Budget.h:151
Budget & WithCalculatedSpend(CalculatedSpendT &&value)
Definition Budget.h:207
Budget & WithHealthStatus(HealthStatusT &&value)
Definition Budget.h:342
bool TimeUnitHasBeenSet() const
Definition Budget.h:152
bool LastUpdatedTimeHasBeenSet() const
Definition Budget.h:235
const AutoAdjustData & GetAutoAdjustData() const
Definition Budget.h:253
const Spend & GetBudgetLimit() const
Definition Budget.h:84
void SetBillingViewArn(BillingViewArnT &&value)
Definition Budget.h:319
void SetAutoAdjustData(AutoAdjustDataT &&value)
Definition Budget.h:256
AWS_BUDGETS_API Budget & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetBudgetName() const
Definition Budget.h:59
const CalculatedSpend & GetCalculatedSpend() const
Definition Budget.h:199
AWS_BUDGETS_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetBillingViewArn() const
Definition Budget.h:316
const Aws::Vector< Metric > & GetMetrics() const
Definition Budget.h:289
bool AutoAdjustDataHasBeenSet() const
Definition Budget.h:254
Budget & WithTimeUnit(TimeUnit value)
Definition Budget.h:157
AWS_BUDGETS_API Budget()=default
bool BillingViewArnHasBeenSet() const
Definition Budget.h:317
Budget & WithBillingViewArn(BillingViewArnT &&value)
Definition Budget.h:324
Budget & WithBudgetName(BudgetNameT &&value)
Definition Budget.h:67
AWS_BUDGETS_API Budget(Aws::Utils::Json::JsonView jsonValue)
bool BudgetNameHasBeenSet() const
Definition Budget.h:60
void SetMetrics(MetricsT &&value)
Definition Budget.h:292
Budget & WithAutoAdjustData(AutoAdjustDataT &&value)
Definition Budget.h:261
Budget & WithTimePeriod(TimePeriodT &&value)
Definition Budget.h:189
Budget & WithBudgetType(BudgetType value)
Definition Budget.h:224
void SetBudgetLimit(BudgetLimitT &&value)
Definition Budget.h:87
bool MetricsHasBeenSet() const
Definition Budget.h:290
bool FilterExpressionHasBeenSet() const
Definition Budget.h:272
const HealthStatus & GetHealthStatus() const
Definition Budget.h:334
const Expression & GetFilterExpression() const
Definition Budget.h:271
bool CalculatedSpendHasBeenSet() const
Definition Budget.h:200
void SetBudgetName(BudgetNameT &&value)
Definition Budget.h:62
bool BudgetTypeHasBeenSet() const
Definition Budget.h:219
Budget & WithPlannedBudgetLimits(PlannedBudgetLimitsT &&value)
Definition Budget.h:135
Budget & WithFilterExpression(FilterExpressionT &&value)
Definition Budget.h:279
Budget & WithBudgetLimit(BudgetLimitT &&value)
Definition Budget.h:92
bool TimePeriodHasBeenSet() const
Definition Budget.h:182
void SetHealthStatus(HealthStatusT &&value)
Definition Budget.h:337
void SetPlannedBudgetLimits(PlannedBudgetLimitsT &&value)
Definition Budget.h:130
void SetCalculatedSpend(CalculatedSpendT &&value)
Definition Budget.h:202
Budget & WithMetrics(MetricsT &&value)
Definition Budget.h:297
BudgetType GetBudgetType() const
Definition Budget.h:218
void SetBudgetType(BudgetType value)
Definition Budget.h:220
void SetTimePeriod(TimePeriodT &&value)
Definition Budget.h:184
void SetFilterExpression(FilterExpressionT &&value)
Definition Budget.h:274
bool BudgetLimitHasBeenSet() const
Definition Budget.h:85
bool HealthStatusHasBeenSet() const
Definition Budget.h:335
void SetTimeUnit(TimeUnit value)
Definition Budget.h:153
Budget & AddPlannedBudgetLimits(PlannedBudgetLimitsKeyT &&key, PlannedBudgetLimitsValueT &&value)
Definition Budget.h:140
const Aws::Utils::DateTime & GetLastUpdatedTime() const
Definition Budget.h:234
void SetLastUpdatedTime(LastUpdatedTimeT &&value)
Definition Budget.h:237
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