AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
CreateCollectionRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/opensearchserverless/OpenSearchServerlessRequest.h>
11#include <aws/opensearchserverless/OpenSearchServerless_EXPORTS.h>
12#include <aws/opensearchserverless/model/CollectionType.h>
13#include <aws/opensearchserverless/model/DeletionProtection.h>
14#include <aws/opensearchserverless/model/EncryptionConfig.h>
15#include <aws/opensearchserverless/model/StandbyReplicas.h>
16#include <aws/opensearchserverless/model/Tag.h>
17#include <aws/opensearchserverless/model/VectorOptions.h>
18
19#include <utility>
20
21namespace Aws {
22namespace OpenSearchServerless {
23namespace Model {
24
28 public:
29 AWS_OPENSEARCHSERVERLESS_API CreateCollectionRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateCollection"; }
36
37 AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override;
38
39 AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() 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 CollectionType GetType() const { return m_type; }
64 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
65 inline void SetType(CollectionType value) {
66 m_typeHasBeenSet = true;
67 m_type = value;
68 }
70 SetType(value);
71 return *this;
72 }
74
76
79 inline const Aws::String& GetDescription() const { return m_description; }
80 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
81 template <typename DescriptionT = Aws::String>
82 void SetDescription(DescriptionT&& value) {
83 m_descriptionHasBeenSet = true;
84 m_description = std::forward<DescriptionT>(value);
85 }
86 template <typename DescriptionT = Aws::String>
88 SetDescription(std::forward<DescriptionT>(value));
89 return *this;
90 }
92
94
98 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
99 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
100 template <typename TagsT = Aws::Vector<Tag>>
101 void SetTags(TagsT&& value) {
102 m_tagsHasBeenSet = true;
103 m_tags = std::forward<TagsT>(value);
104 }
105 template <typename TagsT = Aws::Vector<Tag>>
107 SetTags(std::forward<TagsT>(value));
108 return *this;
109 }
110 template <typename TagsT = Tag>
112 m_tagsHasBeenSet = true;
113 m_tags.emplace_back(std::forward<TagsT>(value));
114 return *this;
115 }
117
119
122 inline StandbyReplicas GetStandbyReplicas() const { return m_standbyReplicas; }
123 inline bool StandbyReplicasHasBeenSet() const { return m_standbyReplicasHasBeenSet; }
125 m_standbyReplicasHasBeenSet = true;
126 m_standbyReplicas = value;
127 }
129 SetStandbyReplicas(value);
130 return *this;
131 }
133
135
138 inline const VectorOptions& GetVectorOptions() const { return m_vectorOptions; }
139 inline bool VectorOptionsHasBeenSet() const { return m_vectorOptionsHasBeenSet; }
140 template <typename VectorOptionsT = VectorOptions>
141 void SetVectorOptions(VectorOptionsT&& value) {
142 m_vectorOptionsHasBeenSet = true;
143 m_vectorOptions = std::forward<VectorOptionsT>(value);
144 }
145 template <typename VectorOptionsT = VectorOptions>
147 SetVectorOptions(std::forward<VectorOptionsT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::String& GetCollectionGroupName() const { return m_collectionGroupName; }
157 inline bool CollectionGroupNameHasBeenSet() const { return m_collectionGroupNameHasBeenSet; }
158 template <typename CollectionGroupNameT = Aws::String>
159 void SetCollectionGroupName(CollectionGroupNameT&& value) {
160 m_collectionGroupNameHasBeenSet = true;
161 m_collectionGroupName = std::forward<CollectionGroupNameT>(value);
162 }
163 template <typename CollectionGroupNameT = Aws::String>
164 CreateCollectionRequest& WithCollectionGroupName(CollectionGroupNameT&& value) {
165 SetCollectionGroupName(std::forward<CollectionGroupNameT>(value));
166 return *this;
167 }
169
171
174 inline const EncryptionConfig& GetEncryptionConfig() const { return m_encryptionConfig; }
175 inline bool EncryptionConfigHasBeenSet() const { return m_encryptionConfigHasBeenSet; }
176 template <typename EncryptionConfigT = EncryptionConfig>
177 void SetEncryptionConfig(EncryptionConfigT&& value) {
178 m_encryptionConfigHasBeenSet = true;
179 m_encryptionConfig = std::forward<EncryptionConfigT>(value);
180 }
181 template <typename EncryptionConfigT = EncryptionConfig>
182 CreateCollectionRequest& WithEncryptionConfig(EncryptionConfigT&& value) {
183 SetEncryptionConfig(std::forward<EncryptionConfigT>(value));
184 return *this;
185 }
187
189
193 inline DeletionProtection GetDeletionProtection() const { return m_deletionProtection; }
194 inline bool DeletionProtectionHasBeenSet() const { return m_deletionProtectionHasBeenSet; }
196 m_deletionProtectionHasBeenSet = true;
197 m_deletionProtection = value;
198 }
201 return *this;
202 }
204
206
209 inline const Aws::String& GetClientToken() const { return m_clientToken; }
210 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
211 template <typename ClientTokenT = Aws::String>
212 void SetClientToken(ClientTokenT&& value) {
213 m_clientTokenHasBeenSet = true;
214 m_clientToken = std::forward<ClientTokenT>(value);
215 }
216 template <typename ClientTokenT = Aws::String>
218 SetClientToken(std::forward<ClientTokenT>(value));
219 return *this;
220 }
222 private:
223 Aws::String m_name;
224
226
227 Aws::String m_description;
228
229 Aws::Vector<Tag> m_tags;
230
231 StandbyReplicas m_standbyReplicas{StandbyReplicas::NOT_SET};
232
233 VectorOptions m_vectorOptions;
234
235 Aws::String m_collectionGroupName;
236
237 EncryptionConfig m_encryptionConfig;
238
240
242 bool m_nameHasBeenSet = false;
243 bool m_typeHasBeenSet = false;
244 bool m_descriptionHasBeenSet = false;
245 bool m_tagsHasBeenSet = false;
246 bool m_standbyReplicasHasBeenSet = false;
247 bool m_vectorOptionsHasBeenSet = false;
248 bool m_collectionGroupNameHasBeenSet = false;
249 bool m_encryptionConfigHasBeenSet = false;
250 bool m_deletionProtectionHasBeenSet = false;
251 bool m_clientTokenHasBeenSet = true;
252};
253
254} // namespace Model
255} // namespace OpenSearchServerless
256} // namespace Aws
AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override
AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateCollectionRequest & WithClientToken(ClientTokenT &&value)
CreateCollectionRequest & WithEncryptionConfig(EncryptionConfigT &&value)
CreateCollectionRequest & WithDeletionProtection(DeletionProtection value)
CreateCollectionRequest & WithStandbyReplicas(StandbyReplicas value)
CreateCollectionRequest & WithType(CollectionType value)
CreateCollectionRequest & WithCollectionGroupName(CollectionGroupNameT &&value)
CreateCollectionRequest & WithDescription(DescriptionT &&value)
CreateCollectionRequest & WithVectorOptions(VectorOptionsT &&value)
AWS_OPENSEARCHSERVERLESS_API CreateCollectionRequest()=default
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector