AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
MethodSetting.h
1
6#pragma once
7#include <aws/apigateway/APIGateway_EXPORTS.h>
8#include <aws/apigateway/model/UnauthorizedCacheControlHeaderStrategy.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace APIGateway {
21namespace Model {
22
29 public:
30 AWS_APIGATEWAY_API MethodSetting() = default;
31 AWS_APIGATEWAY_API MethodSetting(Aws::Utils::Json::JsonView jsonValue);
32 AWS_APIGATEWAY_API MethodSetting& operator=(Aws::Utils::Json::JsonView jsonValue);
33 AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const;
34
36
39 inline bool GetMetricsEnabled() const { return m_metricsEnabled; }
40 inline bool MetricsEnabledHasBeenSet() const { return m_metricsEnabledHasBeenSet; }
41 inline void SetMetricsEnabled(bool value) {
42 m_metricsEnabledHasBeenSet = true;
43 m_metricsEnabled = value;
44 }
45 inline MethodSetting& WithMetricsEnabled(bool value) {
46 SetMetricsEnabled(value);
47 return *this;
48 }
50
52
59 inline const Aws::String& GetLoggingLevel() const { return m_loggingLevel; }
60 inline bool LoggingLevelHasBeenSet() const { return m_loggingLevelHasBeenSet; }
61 template <typename LoggingLevelT = Aws::String>
62 void SetLoggingLevel(LoggingLevelT&& value) {
63 m_loggingLevelHasBeenSet = true;
64 m_loggingLevel = std::forward<LoggingLevelT>(value);
65 }
66 template <typename LoggingLevelT = Aws::String>
67 MethodSetting& WithLoggingLevel(LoggingLevelT&& value) {
68 SetLoggingLevel(std::forward<LoggingLevelT>(value));
69 return *this;
70 }
72
74
80 inline bool GetDataTraceEnabled() const { return m_dataTraceEnabled; }
81 inline bool DataTraceEnabledHasBeenSet() const { return m_dataTraceEnabledHasBeenSet; }
82 inline void SetDataTraceEnabled(bool value) {
83 m_dataTraceEnabledHasBeenSet = true;
84 m_dataTraceEnabled = value;
85 }
86 inline MethodSetting& WithDataTraceEnabled(bool value) {
88 return *this;
89 }
91
93
96 inline int GetThrottlingBurstLimit() const { return m_throttlingBurstLimit; }
97 inline bool ThrottlingBurstLimitHasBeenSet() const { return m_throttlingBurstLimitHasBeenSet; }
98 inline void SetThrottlingBurstLimit(int value) {
99 m_throttlingBurstLimitHasBeenSet = true;
100 m_throttlingBurstLimit = value;
101 }
104 return *this;
105 }
107
109
112 inline double GetThrottlingRateLimit() const { return m_throttlingRateLimit; }
113 inline bool ThrottlingRateLimitHasBeenSet() const { return m_throttlingRateLimitHasBeenSet; }
114 inline void SetThrottlingRateLimit(double value) {
115 m_throttlingRateLimitHasBeenSet = true;
116 m_throttlingRateLimit = value;
117 }
120 return *this;
121 }
123
125
129 inline bool GetCachingEnabled() const { return m_cachingEnabled; }
130 inline bool CachingEnabledHasBeenSet() const { return m_cachingEnabledHasBeenSet; }
131 inline void SetCachingEnabled(bool value) {
132 m_cachingEnabledHasBeenSet = true;
133 m_cachingEnabled = value;
134 }
135 inline MethodSetting& WithCachingEnabled(bool value) {
136 SetCachingEnabled(value);
137 return *this;
138 }
140
142
146 inline int GetCacheTtlInSeconds() const { return m_cacheTtlInSeconds; }
147 inline bool CacheTtlInSecondsHasBeenSet() const { return m_cacheTtlInSecondsHasBeenSet; }
148 inline void SetCacheTtlInSeconds(int value) {
149 m_cacheTtlInSecondsHasBeenSet = true;
150 m_cacheTtlInSeconds = value;
151 }
154 return *this;
155 }
157
159
162 inline bool GetCacheDataEncrypted() const { return m_cacheDataEncrypted; }
163 inline bool CacheDataEncryptedHasBeenSet() const { return m_cacheDataEncryptedHasBeenSet; }
164 inline void SetCacheDataEncrypted(bool value) {
165 m_cacheDataEncryptedHasBeenSet = true;
166 m_cacheDataEncrypted = value;
167 }
170 return *this;
171 }
173
175
179 inline bool GetRequireAuthorizationForCacheControl() const { return m_requireAuthorizationForCacheControl; }
180 inline bool RequireAuthorizationForCacheControlHasBeenSet() const { return m_requireAuthorizationForCacheControlHasBeenSet; }
182 m_requireAuthorizationForCacheControlHasBeenSet = true;
183 m_requireAuthorizationForCacheControl = value;
184 }
187 return *this;
188 }
190
192
196 return m_unauthorizedCacheControlHeaderStrategy;
197 }
198 inline bool UnauthorizedCacheControlHeaderStrategyHasBeenSet() const { return m_unauthorizedCacheControlHeaderStrategyHasBeenSet; }
200 m_unauthorizedCacheControlHeaderStrategyHasBeenSet = true;
201 m_unauthorizedCacheControlHeaderStrategy = value;
202 }
205 return *this;
206 }
208 private:
209 bool m_metricsEnabled{false};
210
211 Aws::String m_loggingLevel;
212
213 bool m_dataTraceEnabled{false};
214
215 int m_throttlingBurstLimit{0};
216
217 double m_throttlingRateLimit{0.0};
218
219 bool m_cachingEnabled{false};
220
221 int m_cacheTtlInSeconds{0};
222
223 bool m_cacheDataEncrypted{false};
224
225 bool m_requireAuthorizationForCacheControl{false};
226
228 bool m_metricsEnabledHasBeenSet = false;
229 bool m_loggingLevelHasBeenSet = false;
230 bool m_dataTraceEnabledHasBeenSet = false;
231 bool m_throttlingBurstLimitHasBeenSet = false;
232 bool m_throttlingRateLimitHasBeenSet = false;
233 bool m_cachingEnabledHasBeenSet = false;
234 bool m_cacheTtlInSecondsHasBeenSet = false;
235 bool m_cacheDataEncryptedHasBeenSet = false;
236 bool m_requireAuthorizationForCacheControlHasBeenSet = false;
237 bool m_unauthorizedCacheControlHeaderStrategyHasBeenSet = false;
238};
239
240} // namespace Model
241} // namespace APIGateway
242} // namespace Aws
MethodSetting & WithThrottlingRateLimit(double value)
AWS_APIGATEWAY_API MethodSetting()=default
UnauthorizedCacheControlHeaderStrategy GetUnauthorizedCacheControlHeaderStrategy() const
MethodSetting & WithLoggingLevel(LoggingLevelT &&value)
MethodSetting & WithCachingEnabled(bool value)
void SetRequireAuthorizationForCacheControl(bool value)
void SetLoggingLevel(LoggingLevelT &&value)
MethodSetting & WithThrottlingBurstLimit(int value)
MethodSetting & WithMetricsEnabled(bool value)
MethodSetting & WithDataTraceEnabled(bool value)
const Aws::String & GetLoggingLevel() const
MethodSetting & WithCacheTtlInSeconds(int value)
void SetUnauthorizedCacheControlHeaderStrategy(UnauthorizedCacheControlHeaderStrategy value)
MethodSetting & WithRequireAuthorizationForCacheControl(bool value)
AWS_APIGATEWAY_API MethodSetting & operator=(Aws::Utils::Json::JsonView jsonValue)
bool RequireAuthorizationForCacheControlHasBeenSet() const
bool UnauthorizedCacheControlHeaderStrategyHasBeenSet() const
AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_APIGATEWAY_API MethodSetting(Aws::Utils::Json::JsonView jsonValue)
MethodSetting & WithCacheDataEncrypted(bool value)
MethodSetting & WithUnauthorizedCacheControlHeaderStrategy(UnauthorizedCacheControlHeaderStrategy value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue