AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
CreateApiKeyRequest.h
1
6#pragma once
7#include <aws/apigateway/APIGatewayRequest.h>
8#include <aws/apigateway/APIGateway_EXPORTS.h>
9#include <aws/apigateway/model/StageKey.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 APIGateway {
18namespace Model {
19
26 public:
27 AWS_APIGATEWAY_API CreateApiKeyRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateApiKey"; }
34
35 AWS_APIGATEWAY_API Aws::String SerializePayload() const override;
36
38
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template <typename NameT = Aws::String>
44 void SetName(NameT&& value) {
45 m_nameHasBeenSet = true;
46 m_name = std::forward<NameT>(value);
47 }
48 template <typename NameT = Aws::String>
49 CreateApiKeyRequest& WithName(NameT&& value) {
50 SetName(std::forward<NameT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetDescription() const { return m_description; }
60 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
61 template <typename DescriptionT = Aws::String>
62 void SetDescription(DescriptionT&& value) {
63 m_descriptionHasBeenSet = true;
64 m_description = std::forward<DescriptionT>(value);
65 }
66 template <typename DescriptionT = Aws::String>
67 CreateApiKeyRequest& WithDescription(DescriptionT&& value) {
68 SetDescription(std::forward<DescriptionT>(value));
69 return *this;
70 }
72
74
77 inline bool GetEnabled() const { return m_enabled; }
78 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
79 inline void SetEnabled(bool value) {
80 m_enabledHasBeenSet = true;
81 m_enabled = value;
82 }
83 inline CreateApiKeyRequest& WithEnabled(bool value) {
84 SetEnabled(value);
85 return *this;
86 }
88
90
95 inline bool GetGenerateDistinctId() const { return m_generateDistinctId; }
96 inline bool GenerateDistinctIdHasBeenSet() const { return m_generateDistinctIdHasBeenSet; }
97 inline void SetGenerateDistinctId(bool value) {
98 m_generateDistinctIdHasBeenSet = true;
99 m_generateDistinctId = value;
100 }
103 return *this;
104 }
106
108
111 inline const Aws::String& GetValue() const { return m_value; }
112 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
113 template <typename ValueT = Aws::String>
114 void SetValue(ValueT&& value) {
115 m_valueHasBeenSet = true;
116 m_value = std::forward<ValueT>(value);
117 }
118 template <typename ValueT = Aws::String>
120 SetValue(std::forward<ValueT>(value));
121 return *this;
122 }
124
126
130 inline const Aws::Vector<StageKey>& GetStageKeys() const { return m_stageKeys; }
131 inline bool StageKeysHasBeenSet() const { return m_stageKeysHasBeenSet; }
132 template <typename StageKeysT = Aws::Vector<StageKey>>
133 void SetStageKeys(StageKeysT&& value) {
134 m_stageKeysHasBeenSet = true;
135 m_stageKeys = std::forward<StageKeysT>(value);
136 }
137 template <typename StageKeysT = Aws::Vector<StageKey>>
138 CreateApiKeyRequest& WithStageKeys(StageKeysT&& value) {
139 SetStageKeys(std::forward<StageKeysT>(value));
140 return *this;
141 }
142 template <typename StageKeysT = StageKey>
143 CreateApiKeyRequest& AddStageKeys(StageKeysT&& value) {
144 m_stageKeysHasBeenSet = true;
145 m_stageKeys.emplace_back(std::forward<StageKeysT>(value));
146 return *this;
147 }
149
151
155 inline const Aws::String& GetCustomerId() const { return m_customerId; }
156 inline bool CustomerIdHasBeenSet() const { return m_customerIdHasBeenSet; }
157 template <typename CustomerIdT = Aws::String>
158 void SetCustomerId(CustomerIdT&& value) {
159 m_customerIdHasBeenSet = true;
160 m_customerId = std::forward<CustomerIdT>(value);
161 }
162 template <typename CustomerIdT = Aws::String>
163 CreateApiKeyRequest& WithCustomerId(CustomerIdT&& value) {
164 SetCustomerId(std::forward<CustomerIdT>(value));
165 return *this;
166 }
168
170
175 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
176 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
177 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
178 void SetTags(TagsT&& value) {
179 m_tagsHasBeenSet = true;
180 m_tags = std::forward<TagsT>(value);
181 }
182 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
184 SetTags(std::forward<TagsT>(value));
185 return *this;
186 }
187 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
188 CreateApiKeyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
189 m_tagsHasBeenSet = true;
190 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
191 return *this;
192 }
194 private:
195 Aws::String m_name;
196
197 Aws::String m_description;
198
199 bool m_enabled{false};
200
201 bool m_generateDistinctId{false};
202
203 Aws::String m_value;
204
205 Aws::Vector<StageKey> m_stageKeys;
206
207 Aws::String m_customerId;
208
210 bool m_nameHasBeenSet = false;
211 bool m_descriptionHasBeenSet = false;
212 bool m_enabledHasBeenSet = false;
213 bool m_generateDistinctIdHasBeenSet = false;
214 bool m_valueHasBeenSet = false;
215 bool m_stageKeysHasBeenSet = false;
216 bool m_customerIdHasBeenSet = false;
217 bool m_tagsHasBeenSet = false;
218};
219
220} // namespace Model
221} // namespace APIGateway
222} // namespace Aws
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateApiKeyRequest & WithName(NameT &&value)
CreateApiKeyRequest & WithValue(ValueT &&value)
CreateApiKeyRequest & WithCustomerId(CustomerIdT &&value)
CreateApiKeyRequest & AddStageKeys(StageKeysT &&value)
CreateApiKeyRequest & WithEnabled(bool value)
CreateApiKeyRequest & WithDescription(DescriptionT &&value)
virtual const char * GetServiceRequestName() const override
AWS_APIGATEWAY_API Aws::String SerializePayload() const override
CreateApiKeyRequest & WithTags(TagsT &&value)
CreateApiKeyRequest & WithGenerateDistinctId(bool value)
CreateApiKeyRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateApiKeyRequest & WithStageKeys(StageKeysT &&value)
AWS_APIGATEWAY_API CreateApiKeyRequest()=default
const Aws::Vector< StageKey > & GetStageKeys() 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