AWS SDK for C++

AWS SDK for C++ Version 1.11.717

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/StandbyReplicas.h>
14#include <aws/opensearchserverless/model/Tag.h>
15#include <aws/opensearchserverless/model/VectorOptions.h>
16
17#include <utility>
18
19namespace Aws {
20namespace OpenSearchServerless {
21namespace Model {
22
26 public:
27 AWS_OPENSEARCHSERVERLESS_API CreateCollectionRequest() = 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 "CreateCollection"; }
34
35 AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override;
36
37 AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38
40
43 inline const Aws::String& GetName() const { return m_name; }
44 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
45 template <typename NameT = Aws::String>
46 void SetName(NameT&& value) {
47 m_nameHasBeenSet = true;
48 m_name = std::forward<NameT>(value);
49 }
50 template <typename NameT = Aws::String>
52 SetName(std::forward<NameT>(value));
53 return *this;
54 }
56
58
61 inline CollectionType GetType() const { return m_type; }
62 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
63 inline void SetType(CollectionType value) {
64 m_typeHasBeenSet = true;
65 m_type = value;
66 }
68 SetType(value);
69 return *this;
70 }
72
74
77 inline const Aws::String& GetDescription() const { return m_description; }
78 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
79 template <typename DescriptionT = Aws::String>
80 void SetDescription(DescriptionT&& value) {
81 m_descriptionHasBeenSet = true;
82 m_description = std::forward<DescriptionT>(value);
83 }
84 template <typename DescriptionT = Aws::String>
86 SetDescription(std::forward<DescriptionT>(value));
87 return *this;
88 }
90
92
96 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
97 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
98 template <typename TagsT = Aws::Vector<Tag>>
99 void SetTags(TagsT&& value) {
100 m_tagsHasBeenSet = true;
101 m_tags = std::forward<TagsT>(value);
102 }
103 template <typename TagsT = Aws::Vector<Tag>>
105 SetTags(std::forward<TagsT>(value));
106 return *this;
107 }
108 template <typename TagsT = Tag>
110 m_tagsHasBeenSet = true;
111 m_tags.emplace_back(std::forward<TagsT>(value));
112 return *this;
113 }
115
117
120 inline StandbyReplicas GetStandbyReplicas() const { return m_standbyReplicas; }
121 inline bool StandbyReplicasHasBeenSet() const { return m_standbyReplicasHasBeenSet; }
123 m_standbyReplicasHasBeenSet = true;
124 m_standbyReplicas = value;
125 }
127 SetStandbyReplicas(value);
128 return *this;
129 }
131
133
136 inline const VectorOptions& GetVectorOptions() const { return m_vectorOptions; }
137 inline bool VectorOptionsHasBeenSet() const { return m_vectorOptionsHasBeenSet; }
138 template <typename VectorOptionsT = VectorOptions>
139 void SetVectorOptions(VectorOptionsT&& value) {
140 m_vectorOptionsHasBeenSet = true;
141 m_vectorOptions = std::forward<VectorOptionsT>(value);
142 }
143 template <typename VectorOptionsT = VectorOptions>
145 SetVectorOptions(std::forward<VectorOptionsT>(value));
146 return *this;
147 }
149
151
154 inline const Aws::String& GetClientToken() const { return m_clientToken; }
155 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
156 template <typename ClientTokenT = Aws::String>
157 void SetClientToken(ClientTokenT&& value) {
158 m_clientTokenHasBeenSet = true;
159 m_clientToken = std::forward<ClientTokenT>(value);
160 }
161 template <typename ClientTokenT = Aws::String>
163 SetClientToken(std::forward<ClientTokenT>(value));
164 return *this;
165 }
167 private:
168 Aws::String m_name;
169
171
172 Aws::String m_description;
173
174 Aws::Vector<Tag> m_tags;
175
176 StandbyReplicas m_standbyReplicas{StandbyReplicas::NOT_SET};
177
178 VectorOptions m_vectorOptions;
179
181 bool m_nameHasBeenSet = false;
182 bool m_typeHasBeenSet = false;
183 bool m_descriptionHasBeenSet = false;
184 bool m_tagsHasBeenSet = false;
185 bool m_standbyReplicasHasBeenSet = false;
186 bool m_vectorOptionsHasBeenSet = false;
187 bool m_clientTokenHasBeenSet = true;
188};
189
190} // namespace Model
191} // namespace OpenSearchServerless
192} // namespace Aws
AWS_OPENSEARCHSERVERLESS_API Aws::String SerializePayload() const override
AWS_OPENSEARCHSERVERLESS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateCollectionRequest & WithClientToken(ClientTokenT &&value)
CreateCollectionRequest & WithStandbyReplicas(StandbyReplicas value)
CreateCollectionRequest & WithType(CollectionType 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