AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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/EncryptionConfig.h>
14#include <aws/opensearchserverless/model/StandbyReplicas.h>
15#include <aws/opensearchserverless/model/Tag.h>
16#include <aws/opensearchserverless/model/VectorOptions.h>
17
18#include <utility>
19
20namespace Aws {
21namespace OpenSearchServerless {
22namespace Model {
23
27 public:
28 AWS_OPENSEARCHSERVERLESS_API CreateCollectionRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateCollection"; }
35
36 AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override;
37
38 AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39
41
44 inline const Aws::String& GetName() const { return m_name; }
45 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
46 template <typename NameT = Aws::String>
47 void SetName(NameT&& value) {
48 m_nameHasBeenSet = true;
49 m_name = std::forward<NameT>(value);
50 }
51 template <typename NameT = Aws::String>
53 SetName(std::forward<NameT>(value));
54 return *this;
55 }
57
59
62 inline CollectionType GetType() const { return m_type; }
63 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
64 inline void SetType(CollectionType value) {
65 m_typeHasBeenSet = true;
66 m_type = value;
67 }
69 SetType(value);
70 return *this;
71 }
73
75
78 inline const Aws::String& GetDescription() const { return m_description; }
79 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
80 template <typename DescriptionT = Aws::String>
81 void SetDescription(DescriptionT&& value) {
82 m_descriptionHasBeenSet = true;
83 m_description = std::forward<DescriptionT>(value);
84 }
85 template <typename DescriptionT = Aws::String>
87 SetDescription(std::forward<DescriptionT>(value));
88 return *this;
89 }
91
93
97 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
98 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
99 template <typename TagsT = Aws::Vector<Tag>>
100 void SetTags(TagsT&& value) {
101 m_tagsHasBeenSet = true;
102 m_tags = std::forward<TagsT>(value);
103 }
104 template <typename TagsT = Aws::Vector<Tag>>
106 SetTags(std::forward<TagsT>(value));
107 return *this;
108 }
109 template <typename TagsT = Tag>
111 m_tagsHasBeenSet = true;
112 m_tags.emplace_back(std::forward<TagsT>(value));
113 return *this;
114 }
116
118
121 inline StandbyReplicas GetStandbyReplicas() const { return m_standbyReplicas; }
122 inline bool StandbyReplicasHasBeenSet() const { return m_standbyReplicasHasBeenSet; }
124 m_standbyReplicasHasBeenSet = true;
125 m_standbyReplicas = value;
126 }
128 SetStandbyReplicas(value);
129 return *this;
130 }
132
134
137 inline const VectorOptions& GetVectorOptions() const { return m_vectorOptions; }
138 inline bool VectorOptionsHasBeenSet() const { return m_vectorOptionsHasBeenSet; }
139 template <typename VectorOptionsT = VectorOptions>
140 void SetVectorOptions(VectorOptionsT&& value) {
141 m_vectorOptionsHasBeenSet = true;
142 m_vectorOptions = std::forward<VectorOptionsT>(value);
143 }
144 template <typename VectorOptionsT = VectorOptions>
146 SetVectorOptions(std::forward<VectorOptionsT>(value));
147 return *this;
148 }
150
152
155 inline const Aws::String& GetCollectionGroupName() const { return m_collectionGroupName; }
156 inline bool CollectionGroupNameHasBeenSet() const { return m_collectionGroupNameHasBeenSet; }
157 template <typename CollectionGroupNameT = Aws::String>
158 void SetCollectionGroupName(CollectionGroupNameT&& value) {
159 m_collectionGroupNameHasBeenSet = true;
160 m_collectionGroupName = std::forward<CollectionGroupNameT>(value);
161 }
162 template <typename CollectionGroupNameT = Aws::String>
163 CreateCollectionRequest& WithCollectionGroupName(CollectionGroupNameT&& value) {
164 SetCollectionGroupName(std::forward<CollectionGroupNameT>(value));
165 return *this;
166 }
168
170
173 inline const EncryptionConfig& GetEncryptionConfig() const { return m_encryptionConfig; }
174 inline bool EncryptionConfigHasBeenSet() const { return m_encryptionConfigHasBeenSet; }
175 template <typename EncryptionConfigT = EncryptionConfig>
176 void SetEncryptionConfig(EncryptionConfigT&& value) {
177 m_encryptionConfigHasBeenSet = true;
178 m_encryptionConfig = std::forward<EncryptionConfigT>(value);
179 }
180 template <typename EncryptionConfigT = EncryptionConfig>
181 CreateCollectionRequest& WithEncryptionConfig(EncryptionConfigT&& value) {
182 SetEncryptionConfig(std::forward<EncryptionConfigT>(value));
183 return *this;
184 }
186
188
191 inline const Aws::String& GetClientToken() const { return m_clientToken; }
192 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
193 template <typename ClientTokenT = Aws::String>
194 void SetClientToken(ClientTokenT&& value) {
195 m_clientTokenHasBeenSet = true;
196 m_clientToken = std::forward<ClientTokenT>(value);
197 }
198 template <typename ClientTokenT = Aws::String>
200 SetClientToken(std::forward<ClientTokenT>(value));
201 return *this;
202 }
204 private:
205 Aws::String m_name;
206
208
209 Aws::String m_description;
210
211 Aws::Vector<Tag> m_tags;
212
213 StandbyReplicas m_standbyReplicas{StandbyReplicas::NOT_SET};
214
215 VectorOptions m_vectorOptions;
216
217 Aws::String m_collectionGroupName;
218
219 EncryptionConfig m_encryptionConfig;
220
222 bool m_nameHasBeenSet = false;
223 bool m_typeHasBeenSet = false;
224 bool m_descriptionHasBeenSet = false;
225 bool m_tagsHasBeenSet = false;
226 bool m_standbyReplicasHasBeenSet = false;
227 bool m_vectorOptionsHasBeenSet = false;
228 bool m_collectionGroupNameHasBeenSet = false;
229 bool m_encryptionConfigHasBeenSet = false;
230 bool m_clientTokenHasBeenSet = true;
231};
232
233} // namespace Model
234} // namespace OpenSearchServerless
235} // 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 & 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