AWS SDK for C++

AWS SDK for C++ Version 1.11.930

Loading...
Searching...
No Matches
QueryVectorsRequest.h
1
6#pragma once
7#include <aws/core/utils/Document.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/s3vectors/S3VectorsRequest.h>
11#include <aws/s3vectors/S3Vectors_EXPORTS.h>
12#include <aws/s3vectors/model/IndexMode.h>
13#include <aws/s3vectors/model/QueryText.h>
14#include <aws/s3vectors/model/VectorData.h>
15
16#include <utility>
17
18namespace Aws {
19namespace S3Vectors {
20namespace Model {
21
25 public:
26 AWS_S3VECTORS_API QueryVectorsRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "QueryVectors"; }
33
34 AWS_S3VECTORS_API Aws::String SerializePayload() const override;
35
37
40 inline const Aws::String& GetVectorBucketName() const { return m_vectorBucketName; }
41 inline bool VectorBucketNameHasBeenSet() const { return m_vectorBucketNameHasBeenSet; }
42 template <typename VectorBucketNameT = Aws::String>
43 void SetVectorBucketName(VectorBucketNameT&& value) {
44 m_vectorBucketNameHasBeenSet = true;
45 m_vectorBucketName = std::forward<VectorBucketNameT>(value);
46 }
47 template <typename VectorBucketNameT = Aws::String>
48 QueryVectorsRequest& WithVectorBucketName(VectorBucketNameT&& value) {
49 SetVectorBucketName(std::forward<VectorBucketNameT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetIndexName() const { return m_indexName; }
59 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
60 template <typename IndexNameT = Aws::String>
61 void SetIndexName(IndexNameT&& value) {
62 m_indexNameHasBeenSet = true;
63 m_indexName = std::forward<IndexNameT>(value);
64 }
65 template <typename IndexNameT = Aws::String>
66 QueryVectorsRequest& WithIndexName(IndexNameT&& value) {
67 SetIndexName(std::forward<IndexNameT>(value));
68 return *this;
69 }
71
73
76 inline const Aws::String& GetIndexArn() const { return m_indexArn; }
77 inline bool IndexArnHasBeenSet() const { return m_indexArnHasBeenSet; }
78 template <typename IndexArnT = Aws::String>
79 void SetIndexArn(IndexArnT&& value) {
80 m_indexArnHasBeenSet = true;
81 m_indexArn = std::forward<IndexArnT>(value);
82 }
83 template <typename IndexArnT = Aws::String>
84 QueryVectorsRequest& WithIndexArn(IndexArnT&& value) {
85 SetIndexArn(std::forward<IndexArnT>(value));
86 return *this;
87 }
89
91
94 inline int GetTopK() const { return m_topK; }
95 inline bool TopKHasBeenSet() const { return m_topKHasBeenSet; }
96 inline void SetTopK(int value) {
97 m_topKHasBeenSet = true;
98 m_topK = value;
99 }
100 inline QueryVectorsRequest& WithTopK(int value) {
101 SetTopK(value);
102 return *this;
103 }
105
107
115 inline const VectorData& GetQueryVector() const { return m_queryVector; }
116 inline bool QueryVectorHasBeenSet() const { return m_queryVectorHasBeenSet; }
117 template <typename QueryVectorT = VectorData>
118 void SetQueryVector(QueryVectorT&& value) {
119 m_queryVectorHasBeenSet = true;
120 m_queryVector = std::forward<QueryVectorT>(value);
121 }
122 template <typename QueryVectorT = VectorData>
123 QueryVectorsRequest& WithQueryVector(QueryVectorT&& value) {
124 SetQueryVector(std::forward<QueryVectorT>(value));
125 return *this;
126 }
128
130
136 inline Aws::Utils::DocumentView GetFilter() const { return m_filter; }
137 inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
138 template <typename FilterT = Aws::Utils::Document>
139 void SetFilter(FilterT&& value) {
140 m_filterHasBeenSet = true;
141 m_filter = std::forward<FilterT>(value);
142 }
143 template <typename FilterT = Aws::Utils::Document>
144 QueryVectorsRequest& WithFilter(FilterT&& value) {
145 SetFilter(std::forward<FilterT>(value));
146 return *this;
147 }
149
151
159 inline IndexMode GetQueryMode() const { return m_queryMode; }
160 inline bool QueryModeHasBeenSet() const { return m_queryModeHasBeenSet; }
161 inline void SetQueryMode(IndexMode value) {
162 m_queryModeHasBeenSet = true;
163 m_queryMode = value;
164 }
166 SetQueryMode(value);
167 return *this;
168 }
170
172
176 inline bool GetReturnMetadata() const { return m_returnMetadata; }
177 inline bool ReturnMetadataHasBeenSet() const { return m_returnMetadataHasBeenSet; }
178 inline void SetReturnMetadata(bool value) {
179 m_returnMetadataHasBeenSet = true;
180 m_returnMetadata = value;
181 }
183 SetReturnMetadata(value);
184 return *this;
185 }
187
189
193 inline bool GetReturnDistance() const { return m_returnDistance; }
194 inline bool ReturnDistanceHasBeenSet() const { return m_returnDistanceHasBeenSet; }
195 inline void SetReturnDistance(bool value) {
196 m_returnDistanceHasBeenSet = true;
197 m_returnDistance = value;
198 }
200 SetReturnDistance(value);
201 return *this;
202 }
204
206
211 inline const Aws::Vector<QueryText>& GetQueryTexts() const { return m_queryTexts; }
212 inline bool QueryTextsHasBeenSet() const { return m_queryTextsHasBeenSet; }
213 template <typename QueryTextsT = Aws::Vector<QueryText>>
214 void SetQueryTexts(QueryTextsT&& value) {
215 m_queryTextsHasBeenSet = true;
216 m_queryTexts = std::forward<QueryTextsT>(value);
217 }
218 template <typename QueryTextsT = Aws::Vector<QueryText>>
219 QueryVectorsRequest& WithQueryTexts(QueryTextsT&& value) {
220 SetQueryTexts(std::forward<QueryTextsT>(value));
221 return *this;
222 }
223 template <typename QueryTextsT = QueryText>
224 QueryVectorsRequest& AddQueryTexts(QueryTextsT&& value) {
225 m_queryTextsHasBeenSet = true;
226 m_queryTexts.emplace_back(std::forward<QueryTextsT>(value));
227 return *this;
228 }
230
232
238 inline bool GetReturnScores() const { return m_returnScores; }
239 inline bool ReturnScoresHasBeenSet() const { return m_returnScoresHasBeenSet; }
240 inline void SetReturnScores(bool value) {
241 m_returnScoresHasBeenSet = true;
242 m_returnScores = value;
243 }
245 SetReturnScores(value);
246 return *this;
247 }
249
251
255 inline const Aws::String& GetNextToken() const { return m_nextToken; }
256 inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
257 template <typename NextTokenT = Aws::String>
258 void SetNextToken(NextTokenT&& value) {
259 m_nextTokenHasBeenSet = true;
260 m_nextToken = std::forward<NextTokenT>(value);
261 }
262 template <typename NextTokenT = Aws::String>
263 QueryVectorsRequest& WithNextToken(NextTokenT&& value) {
264 SetNextToken(std::forward<NextTokenT>(value));
265 return *this;
266 }
268 private:
269 Aws::String m_vectorBucketName;
270
271 Aws::String m_indexName;
272
273 Aws::String m_indexArn;
274
275 int m_topK{0};
276
277 VectorData m_queryVector;
278
279 Aws::Utils::Document m_filter;
280
281 IndexMode m_queryMode{IndexMode::NOT_SET};
282
283 bool m_returnMetadata{false};
284
285 bool m_returnDistance{false};
286
287 Aws::Vector<QueryText> m_queryTexts;
288
289 bool m_returnScores{false};
290
291 Aws::String m_nextToken;
292 bool m_vectorBucketNameHasBeenSet = false;
293 bool m_indexNameHasBeenSet = false;
294 bool m_indexArnHasBeenSet = false;
295 bool m_topKHasBeenSet = false;
296 bool m_queryVectorHasBeenSet = false;
297 bool m_filterHasBeenSet = false;
298 bool m_queryModeHasBeenSet = false;
299 bool m_returnMetadataHasBeenSet = false;
300 bool m_returnDistanceHasBeenSet = false;
301 bool m_queryTextsHasBeenSet = false;
302 bool m_returnScoresHasBeenSet = false;
303 bool m_nextTokenHasBeenSet = false;
304};
305
306} // namespace Model
307} // namespace S3Vectors
308} // namespace Aws
QueryVectorsRequest & WithIndexName(IndexNameT &&value)
AWS_S3VECTORS_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
const Aws::Vector< QueryText > & GetQueryTexts() const
void SetVectorBucketName(VectorBucketNameT &&value)
QueryVectorsRequest & WithNextToken(NextTokenT &&value)
AWS_S3VECTORS_API QueryVectorsRequest()=default
QueryVectorsRequest & WithFilter(FilterT &&value)
QueryVectorsRequest & WithIndexArn(IndexArnT &&value)
QueryVectorsRequest & WithReturnMetadata(bool value)
QueryVectorsRequest & WithReturnScores(bool value)
QueryVectorsRequest & WithVectorBucketName(VectorBucketNameT &&value)
const Aws::String & GetVectorBucketName() const
QueryVectorsRequest & WithQueryVector(QueryVectorT &&value)
QueryVectorsRequest & WithQueryMode(IndexMode value)
QueryVectorsRequest & WithQueryTexts(QueryTextsT &&value)
QueryVectorsRequest & AddQueryTexts(QueryTextsT &&value)
QueryVectorsRequest & WithReturnDistance(bool value)
Aws::Utils::DocumentView GetFilter() const
QueryVectorsRequest & WithTopK(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector