AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
UsageLimit.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/redshift-serverless/RedshiftServerless_EXPORTS.h>
9#include <aws/redshift-serverless/model/UsageLimitBreachAction.h>
10#include <aws/redshift-serverless/model/UsageLimitPeriod.h>
11#include <aws/redshift-serverless/model/UsageLimitUsageType.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace RedshiftServerless {
23namespace Model {
24
31 public:
32 AWS_REDSHIFTSERVERLESS_API UsageLimit() = default;
33 AWS_REDSHIFTSERVERLESS_API UsageLimit(Aws::Utils::Json::JsonView jsonValue);
34 AWS_REDSHIFTSERVERLESS_API UsageLimit& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_REDSHIFTSERVERLESS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
43 inline long long GetAmount() const { return m_amount; }
44 inline bool AmountHasBeenSet() const { return m_amountHasBeenSet; }
45 inline void SetAmount(long long value) {
46 m_amountHasBeenSet = true;
47 m_amount = value;
48 }
49 inline UsageLimit& WithAmount(long long value) {
50 SetAmount(value);
51 return *this;
52 }
54
56
60 inline UsageLimitBreachAction GetBreachAction() const { return m_breachAction; }
61 inline bool BreachActionHasBeenSet() const { return m_breachActionHasBeenSet; }
63 m_breachActionHasBeenSet = true;
64 m_breachAction = value;
65 }
67 SetBreachAction(value);
68 return *this;
69 }
71
73
77 inline UsageLimitPeriod GetPeriod() const { return m_period; }
78 inline bool PeriodHasBeenSet() const { return m_periodHasBeenSet; }
79 inline void SetPeriod(UsageLimitPeriod value) {
80 m_periodHasBeenSet = true;
81 m_period = value;
82 }
84 SetPeriod(value);
85 return *this;
86 }
88
90
94 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
95 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
96 template <typename ResourceArnT = Aws::String>
97 void SetResourceArn(ResourceArnT&& value) {
98 m_resourceArnHasBeenSet = true;
99 m_resourceArn = std::forward<ResourceArnT>(value);
100 }
101 template <typename ResourceArnT = Aws::String>
102 UsageLimit& WithResourceArn(ResourceArnT&& value) {
103 SetResourceArn(std::forward<ResourceArnT>(value));
104 return *this;
105 }
107
109
113 inline const Aws::String& GetUsageLimitArn() const { return m_usageLimitArn; }
114 inline bool UsageLimitArnHasBeenSet() const { return m_usageLimitArnHasBeenSet; }
115 template <typename UsageLimitArnT = Aws::String>
116 void SetUsageLimitArn(UsageLimitArnT&& value) {
117 m_usageLimitArnHasBeenSet = true;
118 m_usageLimitArn = std::forward<UsageLimitArnT>(value);
119 }
120 template <typename UsageLimitArnT = Aws::String>
121 UsageLimit& WithUsageLimitArn(UsageLimitArnT&& value) {
122 SetUsageLimitArn(std::forward<UsageLimitArnT>(value));
123 return *this;
124 }
126
128
131 inline const Aws::String& GetUsageLimitId() const { return m_usageLimitId; }
132 inline bool UsageLimitIdHasBeenSet() const { return m_usageLimitIdHasBeenSet; }
133 template <typename UsageLimitIdT = Aws::String>
134 void SetUsageLimitId(UsageLimitIdT&& value) {
135 m_usageLimitIdHasBeenSet = true;
136 m_usageLimitId = std::forward<UsageLimitIdT>(value);
137 }
138 template <typename UsageLimitIdT = Aws::String>
139 UsageLimit& WithUsageLimitId(UsageLimitIdT&& value) {
140 SetUsageLimitId(std::forward<UsageLimitIdT>(value));
141 return *this;
142 }
144
146
149 inline UsageLimitUsageType GetUsageType() const { return m_usageType; }
150 inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
152 m_usageTypeHasBeenSet = true;
153 m_usageType = value;
154 }
156 SetUsageType(value);
157 return *this;
158 }
160 private:
161 long long m_amount{0};
162
164
166
167 Aws::String m_resourceArn;
168
169 Aws::String m_usageLimitArn;
170
171 Aws::String m_usageLimitId;
172
174 bool m_amountHasBeenSet = false;
175 bool m_breachActionHasBeenSet = false;
176 bool m_periodHasBeenSet = false;
177 bool m_resourceArnHasBeenSet = false;
178 bool m_usageLimitArnHasBeenSet = false;
179 bool m_usageLimitIdHasBeenSet = false;
180 bool m_usageTypeHasBeenSet = false;
181};
182
183} // namespace Model
184} // namespace RedshiftServerless
185} // namespace Aws
UsageLimit & WithUsageLimitArn(UsageLimitArnT &&value)
Definition UsageLimit.h:121
UsageLimit & WithUsageLimitId(UsageLimitIdT &&value)
Definition UsageLimit.h:139
const Aws::String & GetResourceArn() const
Definition UsageLimit.h:94
const Aws::String & GetUsageLimitArn() const
Definition UsageLimit.h:113
void SetUsageType(UsageLimitUsageType value)
Definition UsageLimit.h:151
UsageLimit & WithPeriod(UsageLimitPeriod value)
Definition UsageLimit.h:83
const Aws::String & GetUsageLimitId() const
Definition UsageLimit.h:131
void SetUsageLimitArn(UsageLimitArnT &&value)
Definition UsageLimit.h:116
void SetResourceArn(ResourceArnT &&value)
Definition UsageLimit.h:97
UsageLimit & WithUsageType(UsageLimitUsageType value)
Definition UsageLimit.h:155
void SetBreachAction(UsageLimitBreachAction value)
Definition UsageLimit.h:62
void SetPeriod(UsageLimitPeriod value)
Definition UsageLimit.h:79
UsageLimitUsageType GetUsageType() const
Definition UsageLimit.h:149
AWS_REDSHIFTSERVERLESS_API UsageLimit()=default
UsageLimit & WithAmount(long long value)
Definition UsageLimit.h:49
UsageLimit & WithResourceArn(ResourceArnT &&value)
Definition UsageLimit.h:102
UsageLimitBreachAction GetBreachAction() const
Definition UsageLimit.h:60
UsageLimit & WithBreachAction(UsageLimitBreachAction value)
Definition UsageLimit.h:66
void SetUsageLimitId(UsageLimitIdT &&value)
Definition UsageLimit.h:134
AWS_REDSHIFTSERVERLESS_API UsageLimit & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_REDSHIFTSERVERLESS_API UsageLimit(Aws::Utils::Json::JsonView jsonValue)
AWS_REDSHIFTSERVERLESS_API Aws::Utils::Json::JsonValue Jsonize() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue