AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
Method.h
1
6#pragma once
7#include <aws/apigateway/APIGateway_EXPORTS.h>
8#include <aws/apigateway/model/Integration.h>
9#include <aws/apigateway/model/MethodResponse.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace APIGateway {
24namespace Model {
25
40class Method {
41 public:
42 AWS_APIGATEWAY_API Method() = default;
43 AWS_APIGATEWAY_API Method(Aws::Utils::Json::JsonView jsonValue);
44 AWS_APIGATEWAY_API Method& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const;
46
48
51 inline const Aws::String& GetHttpMethod() const { return m_httpMethod; }
52 inline bool HttpMethodHasBeenSet() const { return m_httpMethodHasBeenSet; }
53 template <typename HttpMethodT = Aws::String>
54 void SetHttpMethod(HttpMethodT&& value) {
55 m_httpMethodHasBeenSet = true;
56 m_httpMethod = std::forward<HttpMethodT>(value);
57 }
58 template <typename HttpMethodT = Aws::String>
59 Method& WithHttpMethod(HttpMethodT&& value) {
60 SetHttpMethod(std::forward<HttpMethodT>(value));
61 return *this;
62 }
64
66
72 inline const Aws::String& GetAuthorizationType() const { return m_authorizationType; }
73 inline bool AuthorizationTypeHasBeenSet() const { return m_authorizationTypeHasBeenSet; }
74 template <typename AuthorizationTypeT = Aws::String>
75 void SetAuthorizationType(AuthorizationTypeT&& value) {
76 m_authorizationTypeHasBeenSet = true;
77 m_authorizationType = std::forward<AuthorizationTypeT>(value);
78 }
79 template <typename AuthorizationTypeT = Aws::String>
80 Method& WithAuthorizationType(AuthorizationTypeT&& value) {
81 SetAuthorizationType(std::forward<AuthorizationTypeT>(value));
82 return *this;
83 }
85
87
91 inline const Aws::String& GetAuthorizerId() const { return m_authorizerId; }
92 inline bool AuthorizerIdHasBeenSet() const { return m_authorizerIdHasBeenSet; }
93 template <typename AuthorizerIdT = Aws::String>
94 void SetAuthorizerId(AuthorizerIdT&& value) {
95 m_authorizerIdHasBeenSet = true;
96 m_authorizerId = std::forward<AuthorizerIdT>(value);
97 }
98 template <typename AuthorizerIdT = Aws::String>
99 Method& WithAuthorizerId(AuthorizerIdT&& value) {
100 SetAuthorizerId(std::forward<AuthorizerIdT>(value));
101 return *this;
102 }
104
106
110 inline bool GetApiKeyRequired() const { return m_apiKeyRequired; }
111 inline bool ApiKeyRequiredHasBeenSet() const { return m_apiKeyRequiredHasBeenSet; }
112 inline void SetApiKeyRequired(bool value) {
113 m_apiKeyRequiredHasBeenSet = true;
114 m_apiKeyRequired = value;
115 }
116 inline Method& WithApiKeyRequired(bool value) {
117 SetApiKeyRequired(value);
118 return *this;
119 }
121
123
126 inline const Aws::String& GetRequestValidatorId() const { return m_requestValidatorId; }
127 inline bool RequestValidatorIdHasBeenSet() const { return m_requestValidatorIdHasBeenSet; }
128 template <typename RequestValidatorIdT = Aws::String>
129 void SetRequestValidatorId(RequestValidatorIdT&& value) {
130 m_requestValidatorIdHasBeenSet = true;
131 m_requestValidatorId = std::forward<RequestValidatorIdT>(value);
132 }
133 template <typename RequestValidatorIdT = Aws::String>
134 Method& WithRequestValidatorId(RequestValidatorIdT&& value) {
135 SetRequestValidatorId(std::forward<RequestValidatorIdT>(value));
136 return *this;
137 }
139
141
146 inline const Aws::String& GetOperationName() const { return m_operationName; }
147 inline bool OperationNameHasBeenSet() const { return m_operationNameHasBeenSet; }
148 template <typename OperationNameT = Aws::String>
149 void SetOperationName(OperationNameT&& value) {
150 m_operationNameHasBeenSet = true;
151 m_operationName = std::forward<OperationNameT>(value);
152 }
153 template <typename OperationNameT = Aws::String>
154 Method& WithOperationName(OperationNameT&& value) {
155 SetOperationName(std::forward<OperationNameT>(value));
156 return *this;
157 }
159
161
172 inline const Aws::Map<Aws::String, bool>& GetRequestParameters() const { return m_requestParameters; }
173 inline bool RequestParametersHasBeenSet() const { return m_requestParametersHasBeenSet; }
174 template <typename RequestParametersT = Aws::Map<Aws::String, bool>>
175 void SetRequestParameters(RequestParametersT&& value) {
176 m_requestParametersHasBeenSet = true;
177 m_requestParameters = std::forward<RequestParametersT>(value);
178 }
179 template <typename RequestParametersT = Aws::Map<Aws::String, bool>>
180 Method& WithRequestParameters(RequestParametersT&& value) {
181 SetRequestParameters(std::forward<RequestParametersT>(value));
182 return *this;
183 }
184 inline Method& AddRequestParameters(Aws::String key, bool value) {
185 m_requestParametersHasBeenSet = true;
186 m_requestParameters.emplace(key, value);
187 return *this;
188 }
190
192
197 inline const Aws::Map<Aws::String, Aws::String>& GetRequestModels() const { return m_requestModels; }
198 inline bool RequestModelsHasBeenSet() const { return m_requestModelsHasBeenSet; }
199 template <typename RequestModelsT = Aws::Map<Aws::String, Aws::String>>
200 void SetRequestModels(RequestModelsT&& value) {
201 m_requestModelsHasBeenSet = true;
202 m_requestModels = std::forward<RequestModelsT>(value);
203 }
204 template <typename RequestModelsT = Aws::Map<Aws::String, Aws::String>>
205 Method& WithRequestModels(RequestModelsT&& value) {
206 SetRequestModels(std::forward<RequestModelsT>(value));
207 return *this;
208 }
209 template <typename RequestModelsKeyT = Aws::String, typename RequestModelsValueT = Aws::String>
210 Method& AddRequestModels(RequestModelsKeyT&& key, RequestModelsValueT&& value) {
211 m_requestModelsHasBeenSet = true;
212 m_requestModels.emplace(std::forward<RequestModelsKeyT>(key), std::forward<RequestModelsValueT>(value));
213 return *this;
214 }
216
218
221 inline const Aws::Map<Aws::String, MethodResponse>& GetMethodResponses() const { return m_methodResponses; }
222 inline bool MethodResponsesHasBeenSet() const { return m_methodResponsesHasBeenSet; }
223 template <typename MethodResponsesT = Aws::Map<Aws::String, MethodResponse>>
224 void SetMethodResponses(MethodResponsesT&& value) {
225 m_methodResponsesHasBeenSet = true;
226 m_methodResponses = std::forward<MethodResponsesT>(value);
227 }
228 template <typename MethodResponsesT = Aws::Map<Aws::String, MethodResponse>>
229 Method& WithMethodResponses(MethodResponsesT&& value) {
230 SetMethodResponses(std::forward<MethodResponsesT>(value));
231 return *this;
232 }
233 template <typename MethodResponsesKeyT = Aws::String, typename MethodResponsesValueT = MethodResponse>
234 Method& AddMethodResponses(MethodResponsesKeyT&& key, MethodResponsesValueT&& value) {
235 m_methodResponsesHasBeenSet = true;
236 m_methodResponses.emplace(std::forward<MethodResponsesKeyT>(key), std::forward<MethodResponsesValueT>(value));
237 return *this;
238 }
240
242
247 inline const Integration& GetMethodIntegration() const { return m_methodIntegration; }
248 inline bool MethodIntegrationHasBeenSet() const { return m_methodIntegrationHasBeenSet; }
249 template <typename MethodIntegrationT = Integration>
250 void SetMethodIntegration(MethodIntegrationT&& value) {
251 m_methodIntegrationHasBeenSet = true;
252 m_methodIntegration = std::forward<MethodIntegrationT>(value);
253 }
254 template <typename MethodIntegrationT = Integration>
255 Method& WithMethodIntegration(MethodIntegrationT&& value) {
256 SetMethodIntegration(std::forward<MethodIntegrationT>(value));
257 return *this;
258 }
260
262
272 inline const Aws::Vector<Aws::String>& GetAuthorizationScopes() const { return m_authorizationScopes; }
273 inline bool AuthorizationScopesHasBeenSet() const { return m_authorizationScopesHasBeenSet; }
274 template <typename AuthorizationScopesT = Aws::Vector<Aws::String>>
275 void SetAuthorizationScopes(AuthorizationScopesT&& value) {
276 m_authorizationScopesHasBeenSet = true;
277 m_authorizationScopes = std::forward<AuthorizationScopesT>(value);
278 }
279 template <typename AuthorizationScopesT = Aws::Vector<Aws::String>>
280 Method& WithAuthorizationScopes(AuthorizationScopesT&& value) {
281 SetAuthorizationScopes(std::forward<AuthorizationScopesT>(value));
282 return *this;
283 }
284 template <typename AuthorizationScopesT = Aws::String>
285 Method& AddAuthorizationScopes(AuthorizationScopesT&& value) {
286 m_authorizationScopesHasBeenSet = true;
287 m_authorizationScopes.emplace_back(std::forward<AuthorizationScopesT>(value));
288 return *this;
289 }
291
293
294 inline const Aws::String& GetRequestId() const { return m_requestId; }
295 inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; }
296 template <typename RequestIdT = Aws::String>
297 void SetRequestId(RequestIdT&& value) {
298 m_requestIdHasBeenSet = true;
299 m_requestId = std::forward<RequestIdT>(value);
300 }
301 template <typename RequestIdT = Aws::String>
302 Method& WithRequestId(RequestIdT&& value) {
303 SetRequestId(std::forward<RequestIdT>(value));
304 return *this;
305 }
307 private:
308 Aws::String m_httpMethod;
309
310 Aws::String m_authorizationType;
311
312 Aws::String m_authorizerId;
313
314 bool m_apiKeyRequired{false};
315
316 Aws::String m_requestValidatorId;
317
318 Aws::String m_operationName;
319
320 Aws::Map<Aws::String, bool> m_requestParameters;
321
323
325
326 Integration m_methodIntegration;
327
328 Aws::Vector<Aws::String> m_authorizationScopes;
329
330 Aws::String m_requestId;
331 bool m_httpMethodHasBeenSet = false;
332 bool m_authorizationTypeHasBeenSet = false;
333 bool m_authorizerIdHasBeenSet = false;
334 bool m_apiKeyRequiredHasBeenSet = false;
335 bool m_requestValidatorIdHasBeenSet = false;
336 bool m_operationNameHasBeenSet = false;
337 bool m_requestParametersHasBeenSet = false;
338 bool m_requestModelsHasBeenSet = false;
339 bool m_methodResponsesHasBeenSet = false;
340 bool m_methodIntegrationHasBeenSet = false;
341 bool m_authorizationScopesHasBeenSet = false;
342 bool m_requestIdHasBeenSet = false;
343};
344
345} // namespace Model
346} // namespace APIGateway
347} // namespace Aws
const Aws::String & GetRequestId() const
Definition Method.h:294
const Aws::String & GetHttpMethod() const
Definition Method.h:51
Method & WithRequestParameters(RequestParametersT &&value)
Definition Method.h:180
const Aws::String & GetRequestValidatorId() const
Definition Method.h:126
const Aws::String & GetAuthorizerId() const
Definition Method.h:91
Method & WithAuthorizationType(AuthorizationTypeT &&value)
Definition Method.h:80
Method & AddRequestParameters(Aws::String key, bool value)
Definition Method.h:184
AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetOperationName() const
Definition Method.h:146
bool RequestModelsHasBeenSet() const
Definition Method.h:198
Method & WithMethodResponses(MethodResponsesT &&value)
Definition Method.h:229
void SetMethodIntegration(MethodIntegrationT &&value)
Definition Method.h:250
bool RequestIdHasBeenSet() const
Definition Method.h:295
bool HttpMethodHasBeenSet() const
Definition Method.h:52
Method & AddAuthorizationScopes(AuthorizationScopesT &&value)
Definition Method.h:285
void SetRequestParameters(RequestParametersT &&value)
Definition Method.h:175
const Aws::Vector< Aws::String > & GetAuthorizationScopes() const
Definition Method.h:272
void SetAuthorizerId(AuthorizerIdT &&value)
Definition Method.h:94
Method & AddRequestModels(RequestModelsKeyT &&key, RequestModelsValueT &&value)
Definition Method.h:210
bool RequestValidatorIdHasBeenSet() const
Definition Method.h:127
void SetRequestId(RequestIdT &&value)
Definition Method.h:297
Method & WithRequestValidatorId(RequestValidatorIdT &&value)
Definition Method.h:134
AWS_APIGATEWAY_API Method()=default
void SetHttpMethod(HttpMethodT &&value)
Definition Method.h:54
const Aws::Map< Aws::String, MethodResponse > & GetMethodResponses() const
Definition Method.h:221
AWS_APIGATEWAY_API Method(Aws::Utils::Json::JsonView jsonValue)
void SetApiKeyRequired(bool value)
Definition Method.h:112
bool MethodIntegrationHasBeenSet() const
Definition Method.h:248
bool AuthorizerIdHasBeenSet() const
Definition Method.h:92
void SetAuthorizationScopes(AuthorizationScopesT &&value)
Definition Method.h:275
Method & WithHttpMethod(HttpMethodT &&value)
Definition Method.h:59
const Aws::Map< Aws::String, Aws::String > & GetRequestModels() const
Definition Method.h:197
bool AuthorizationScopesHasBeenSet() const
Definition Method.h:273
Method & WithAuthorizerId(AuthorizerIdT &&value)
Definition Method.h:99
bool AuthorizationTypeHasBeenSet() const
Definition Method.h:73
void SetRequestValidatorId(RequestValidatorIdT &&value)
Definition Method.h:129
Method & WithApiKeyRequired(bool value)
Definition Method.h:116
Method & WithAuthorizationScopes(AuthorizationScopesT &&value)
Definition Method.h:280
const Aws::String & GetAuthorizationType() const
Definition Method.h:72
Method & WithRequestId(RequestIdT &&value)
Definition Method.h:302
Method & AddMethodResponses(MethodResponsesKeyT &&key, MethodResponsesValueT &&value)
Definition Method.h:234
const Integration & GetMethodIntegration() const
Definition Method.h:247
void SetMethodResponses(MethodResponsesT &&value)
Definition Method.h:224
const Aws::Map< Aws::String, bool > & GetRequestParameters() const
Definition Method.h:172
Method & WithRequestModels(RequestModelsT &&value)
Definition Method.h:205
bool ApiKeyRequiredHasBeenSet() const
Definition Method.h:111
bool GetApiKeyRequired() const
Definition Method.h:110
void SetRequestModels(RequestModelsT &&value)
Definition Method.h:200
void SetOperationName(OperationNameT &&value)
Definition Method.h:149
bool RequestParametersHasBeenSet() const
Definition Method.h:173
AWS_APIGATEWAY_API Method & operator=(Aws::Utils::Json::JsonView jsonValue)
bool MethodResponsesHasBeenSet() const
Definition Method.h:222
Method & WithOperationName(OperationNameT &&value)
Definition Method.h:154
void SetAuthorizationType(AuthorizationTypeT &&value)
Definition Method.h:75
bool OperationNameHasBeenSet() const
Definition Method.h:147
Method & WithMethodIntegration(MethodIntegrationT &&value)
Definition Method.h:255
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