AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
CreateRestApiRequest.h
1
6#pragma once
7#include <aws/apigateway/APIGatewayRequest.h>
8#include <aws/apigateway/APIGateway_EXPORTS.h>
9#include <aws/apigateway/model/ApiKeySourceType.h>
10#include <aws/apigateway/model/EndpointAccessMode.h>
11#include <aws/apigateway/model/EndpointConfiguration.h>
12#include <aws/apigateway/model/SecurityPolicy.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace APIGateway {
21namespace Model {
22
30 public:
31 AWS_APIGATEWAY_API CreateRestApiRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateRestApi"; }
38
39 AWS_APIGATEWAY_API Aws::String SerializePayload() const override;
40
42
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template <typename NameT = Aws::String>
48 void SetName(NameT&& value) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetDescription() const { return m_description; }
64 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
65 template <typename DescriptionT = Aws::String>
66 void SetDescription(DescriptionT&& value) {
67 m_descriptionHasBeenSet = true;
68 m_description = std::forward<DescriptionT>(value);
69 }
70 template <typename DescriptionT = Aws::String>
71 CreateRestApiRequest& WithDescription(DescriptionT&& value) {
72 SetDescription(std::forward<DescriptionT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetVersion() const { return m_version; }
82 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
83 template <typename VersionT = Aws::String>
84 void SetVersion(VersionT&& value) {
85 m_versionHasBeenSet = true;
86 m_version = std::forward<VersionT>(value);
87 }
88 template <typename VersionT = Aws::String>
89 CreateRestApiRequest& WithVersion(VersionT&& value) {
90 SetVersion(std::forward<VersionT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetCloneFrom() const { return m_cloneFrom; }
100 inline bool CloneFromHasBeenSet() const { return m_cloneFromHasBeenSet; }
101 template <typename CloneFromT = Aws::String>
102 void SetCloneFrom(CloneFromT&& value) {
103 m_cloneFromHasBeenSet = true;
104 m_cloneFrom = std::forward<CloneFromT>(value);
105 }
106 template <typename CloneFromT = Aws::String>
107 CreateRestApiRequest& WithCloneFrom(CloneFromT&& value) {
108 SetCloneFrom(std::forward<CloneFromT>(value));
109 return *this;
110 }
112
114
118 inline const Aws::Vector<Aws::String>& GetBinaryMediaTypes() const { return m_binaryMediaTypes; }
119 inline bool BinaryMediaTypesHasBeenSet() const { return m_binaryMediaTypesHasBeenSet; }
120 template <typename BinaryMediaTypesT = Aws::Vector<Aws::String>>
121 void SetBinaryMediaTypes(BinaryMediaTypesT&& value) {
122 m_binaryMediaTypesHasBeenSet = true;
123 m_binaryMediaTypes = std::forward<BinaryMediaTypesT>(value);
124 }
125 template <typename BinaryMediaTypesT = Aws::Vector<Aws::String>>
126 CreateRestApiRequest& WithBinaryMediaTypes(BinaryMediaTypesT&& value) {
127 SetBinaryMediaTypes(std::forward<BinaryMediaTypesT>(value));
128 return *this;
129 }
130 template <typename BinaryMediaTypesT = Aws::String>
131 CreateRestApiRequest& AddBinaryMediaTypes(BinaryMediaTypesT&& value) {
132 m_binaryMediaTypesHasBeenSet = true;
133 m_binaryMediaTypes.emplace_back(std::forward<BinaryMediaTypesT>(value));
134 return *this;
135 }
137
139
146 inline int GetMinimumCompressionSize() const { return m_minimumCompressionSize; }
147 inline bool MinimumCompressionSizeHasBeenSet() const { return m_minimumCompressionSizeHasBeenSet; }
148 inline void SetMinimumCompressionSize(int value) {
149 m_minimumCompressionSizeHasBeenSet = true;
150 m_minimumCompressionSize = value;
151 }
154 return *this;
155 }
157
159
165 inline ApiKeySourceType GetApiKeySource() const { return m_apiKeySource; }
166 inline bool ApiKeySourceHasBeenSet() const { return m_apiKeySourceHasBeenSet; }
168 m_apiKeySourceHasBeenSet = true;
169 m_apiKeySource = value;
170 }
172 SetApiKeySource(value);
173 return *this;
174 }
176
178
182 inline const EndpointConfiguration& GetEndpointConfiguration() const { return m_endpointConfiguration; }
183 inline bool EndpointConfigurationHasBeenSet() const { return m_endpointConfigurationHasBeenSet; }
184 template <typename EndpointConfigurationT = EndpointConfiguration>
185 void SetEndpointConfiguration(EndpointConfigurationT&& value) {
186 m_endpointConfigurationHasBeenSet = true;
187 m_endpointConfiguration = std::forward<EndpointConfigurationT>(value);
188 }
189 template <typename EndpointConfigurationT = EndpointConfiguration>
190 CreateRestApiRequest& WithEndpointConfiguration(EndpointConfigurationT&& value) {
191 SetEndpointConfiguration(std::forward<EndpointConfigurationT>(value));
192 return *this;
193 }
195
197
201 inline const Aws::String& GetPolicy() const { return m_policy; }
202 inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; }
203 template <typename PolicyT = Aws::String>
204 void SetPolicy(PolicyT&& value) {
205 m_policyHasBeenSet = true;
206 m_policy = std::forward<PolicyT>(value);
207 }
208 template <typename PolicyT = Aws::String>
210 SetPolicy(std::forward<PolicyT>(value));
211 return *this;
212 }
214
216
221 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
222 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
223 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
224 void SetTags(TagsT&& value) {
225 m_tagsHasBeenSet = true;
226 m_tags = std::forward<TagsT>(value);
227 }
228 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
230 SetTags(std::forward<TagsT>(value));
231 return *this;
232 }
233 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
234 CreateRestApiRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
235 m_tagsHasBeenSet = true;
236 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
237 return *this;
238 }
240
242
249 inline bool GetDisableExecuteApiEndpoint() const { return m_disableExecuteApiEndpoint; }
250 inline bool DisableExecuteApiEndpointHasBeenSet() const { return m_disableExecuteApiEndpointHasBeenSet; }
251 inline void SetDisableExecuteApiEndpoint(bool value) {
252 m_disableExecuteApiEndpointHasBeenSet = true;
253 m_disableExecuteApiEndpoint = value;
254 }
257 return *this;
258 }
260
262
266 inline SecurityPolicy GetSecurityPolicy() const { return m_securityPolicy; }
267 inline bool SecurityPolicyHasBeenSet() const { return m_securityPolicyHasBeenSet; }
269 m_securityPolicyHasBeenSet = true;
270 m_securityPolicy = value;
271 }
273 SetSecurityPolicy(value);
274 return *this;
275 }
277
279
283 inline EndpointAccessMode GetEndpointAccessMode() const { return m_endpointAccessMode; }
284 inline bool EndpointAccessModeHasBeenSet() const { return m_endpointAccessModeHasBeenSet; }
286 m_endpointAccessModeHasBeenSet = true;
287 m_endpointAccessMode = value;
288 }
291 return *this;
292 }
294 private:
295 Aws::String m_name;
296
297 Aws::String m_description;
298
299 Aws::String m_version;
300
301 Aws::String m_cloneFrom;
302
303 Aws::Vector<Aws::String> m_binaryMediaTypes;
304
305 int m_minimumCompressionSize{0};
306
308
309 EndpointConfiguration m_endpointConfiguration;
310
311 Aws::String m_policy;
312
314
315 bool m_disableExecuteApiEndpoint{false};
316
317 SecurityPolicy m_securityPolicy{SecurityPolicy::NOT_SET};
318
320 bool m_nameHasBeenSet = false;
321 bool m_descriptionHasBeenSet = false;
322 bool m_versionHasBeenSet = false;
323 bool m_cloneFromHasBeenSet = false;
324 bool m_binaryMediaTypesHasBeenSet = false;
325 bool m_minimumCompressionSizeHasBeenSet = false;
326 bool m_apiKeySourceHasBeenSet = false;
327 bool m_endpointConfigurationHasBeenSet = false;
328 bool m_policyHasBeenSet = false;
329 bool m_tagsHasBeenSet = false;
330 bool m_disableExecuteApiEndpointHasBeenSet = false;
331 bool m_securityPolicyHasBeenSet = false;
332 bool m_endpointAccessModeHasBeenSet = false;
333};
334
335} // namespace Model
336} // namespace APIGateway
337} // namespace Aws
void SetBinaryMediaTypes(BinaryMediaTypesT &&value)
AWS_APIGATEWAY_API CreateRestApiRequest()=default
CreateRestApiRequest & WithVersion(VersionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateRestApiRequest & WithPolicy(PolicyT &&value)
virtual const char * GetServiceRequestName() const override
CreateRestApiRequest & AddBinaryMediaTypes(BinaryMediaTypesT &&value)
void SetEndpointAccessMode(EndpointAccessMode value)
void SetEndpointConfiguration(EndpointConfigurationT &&value)
const Aws::Vector< Aws::String > & GetBinaryMediaTypes() const
CreateRestApiRequest & WithSecurityPolicy(SecurityPolicy value)
CreateRestApiRequest & WithCloneFrom(CloneFromT &&value)
CreateRestApiRequest & WithTags(TagsT &&value)
CreateRestApiRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateRestApiRequest & WithDisableExecuteApiEndpoint(bool value)
AWS_APIGATEWAY_API Aws::String SerializePayload() const override
CreateRestApiRequest & WithEndpointConfiguration(EndpointConfigurationT &&value)
CreateRestApiRequest & WithApiKeySource(ApiKeySourceType value)
CreateRestApiRequest & WithMinimumCompressionSize(int value)
CreateRestApiRequest & WithDescription(DescriptionT &&value)
CreateRestApiRequest & WithName(NameT &&value)
CreateRestApiRequest & WithEndpointAccessMode(EndpointAccessMode value)
CreateRestApiRequest & WithBinaryMediaTypes(BinaryMediaTypesT &&value)
const EndpointConfiguration & GetEndpointConfiguration() const
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