AWS SDK for C++

AWS SDK for C++ Version 1.11.870

Loading...
Searching...
No Matches
SearchVectorsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/dynamodb/DynamoDBRequest.h>
11#include <aws/dynamodb/DynamoDB_EXPORTS.h>
12#include <aws/dynamodb/model/AttributeValue.h>
13#include <aws/dynamodb/model/ReturnConsumedCapacity.h>
14
15#include <utility>
16
17namespace Aws {
18namespace DynamoDB {
19namespace Model {
20
24 public:
25 AWS_DYNAMODB_API SearchVectorsRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "SearchVectors"; }
32
33 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
34
36
40 AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override;
41
43
47 inline const Aws::String& GetTableName() const { return m_tableName; }
48 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
49 template <typename TableNameT = Aws::String>
50 void SetTableName(TableNameT&& value) {
51 m_tableNameHasBeenSet = true;
52 m_tableName = std::forward<TableNameT>(value);
53 }
54 template <typename TableNameT = Aws::String>
55 SearchVectorsRequest& WithTableName(TableNameT&& value) {
56 SetTableName(std::forward<TableNameT>(value));
57 return *this;
58 }
60
62
66 inline const Aws::String& GetIndexName() const { return m_indexName; }
67 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
68 template <typename IndexNameT = Aws::String>
69 void SetIndexName(IndexNameT&& value) {
70 m_indexNameHasBeenSet = true;
71 m_indexName = std::forward<IndexNameT>(value);
72 }
73 template <typename IndexNameT = Aws::String>
74 SearchVectorsRequest& WithIndexName(IndexNameT&& value) {
75 SetIndexName(std::forward<IndexNameT>(value));
76 return *this;
77 }
79
81
82 inline ReturnConsumedCapacity GetReturnConsumedCapacity() const { return m_returnConsumedCapacity; }
83 inline bool ReturnConsumedCapacityHasBeenSet() const { return m_returnConsumedCapacityHasBeenSet; }
85 m_returnConsumedCapacityHasBeenSet = true;
86 m_returnConsumedCapacity = value;
87 }
90 return *this;
91 }
93
95
99 inline const Aws::Map<Aws::String, Aws::String>& GetExpressionAttributeNames() const { return m_expressionAttributeNames; }
100 inline bool ExpressionAttributeNamesHasBeenSet() const { return m_expressionAttributeNamesHasBeenSet; }
101 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
102 void SetExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
103 m_expressionAttributeNamesHasBeenSet = true;
104 m_expressionAttributeNames = std::forward<ExpressionAttributeNamesT>(value);
105 }
106 template <typename ExpressionAttributeNamesT = Aws::Map<Aws::String, Aws::String>>
107 SearchVectorsRequest& WithExpressionAttributeNames(ExpressionAttributeNamesT&& value) {
108 SetExpressionAttributeNames(std::forward<ExpressionAttributeNamesT>(value));
109 return *this;
110 }
111 template <typename ExpressionAttributeNamesKeyT = Aws::String, typename ExpressionAttributeNamesValueT = Aws::String>
112 SearchVectorsRequest& AddExpressionAttributeNames(ExpressionAttributeNamesKeyT&& key, ExpressionAttributeNamesValueT&& value) {
113 m_expressionAttributeNamesHasBeenSet = true;
114 m_expressionAttributeNames.emplace(std::forward<ExpressionAttributeNamesKeyT>(key),
115 std::forward<ExpressionAttributeNamesValueT>(value));
116 return *this;
117 }
119
121
125 inline const Aws::Map<Aws::String, AttributeValue>& GetExpressionAttributeValues() const { return m_expressionAttributeValues; }
126 inline bool ExpressionAttributeValuesHasBeenSet() const { return m_expressionAttributeValuesHasBeenSet; }
127 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
128 void SetExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
129 m_expressionAttributeValuesHasBeenSet = true;
130 m_expressionAttributeValues = std::forward<ExpressionAttributeValuesT>(value);
131 }
132 template <typename ExpressionAttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
133 SearchVectorsRequest& WithExpressionAttributeValues(ExpressionAttributeValuesT&& value) {
134 SetExpressionAttributeValues(std::forward<ExpressionAttributeValuesT>(value));
135 return *this;
136 }
137 template <typename ExpressionAttributeValuesKeyT = Aws::String, typename ExpressionAttributeValuesValueT = AttributeValue>
138 SearchVectorsRequest& AddExpressionAttributeValues(ExpressionAttributeValuesKeyT&& key, ExpressionAttributeValuesValueT&& value) {
139 m_expressionAttributeValuesHasBeenSet = true;
140 m_expressionAttributeValues.emplace(std::forward<ExpressionAttributeValuesKeyT>(key),
141 std::forward<ExpressionAttributeValuesValueT>(value));
142 return *this;
143 }
145
147
153 inline const Aws::String& GetProjectionExpression() const { return m_projectionExpression; }
154 inline bool ProjectionExpressionHasBeenSet() const { return m_projectionExpressionHasBeenSet; }
155 template <typename ProjectionExpressionT = Aws::String>
156 void SetProjectionExpression(ProjectionExpressionT&& value) {
157 m_projectionExpressionHasBeenSet = true;
158 m_projectionExpression = std::forward<ProjectionExpressionT>(value);
159 }
160 template <typename ProjectionExpressionT = Aws::String>
161 SearchVectorsRequest& WithProjectionExpression(ProjectionExpressionT&& value) {
162 SetProjectionExpression(std::forward<ProjectionExpressionT>(value));
163 return *this;
164 }
166
168
174 inline const Aws::Vector<AttributeValue>& GetSearchVector() const { return m_searchVector; }
175 inline bool SearchVectorHasBeenSet() const { return m_searchVectorHasBeenSet; }
176 template <typename SearchVectorT = Aws::Vector<AttributeValue>>
177 void SetSearchVector(SearchVectorT&& value) {
178 m_searchVectorHasBeenSet = true;
179 m_searchVector = std::forward<SearchVectorT>(value);
180 }
181 template <typename SearchVectorT = Aws::Vector<AttributeValue>>
182 SearchVectorsRequest& WithSearchVector(SearchVectorT&& value) {
183 SetSearchVector(std::forward<SearchVectorT>(value));
184 return *this;
185 }
186 template <typename SearchVectorT = AttributeValue>
187 SearchVectorsRequest& AddSearchVector(SearchVectorT&& value) {
188 m_searchVectorHasBeenSet = true;
189 m_searchVector.emplace_back(std::forward<SearchVectorT>(value));
190 return *this;
191 }
193
195
204 inline const Aws::String& GetSearchConditionExpression() const { return m_searchConditionExpression; }
205 inline bool SearchConditionExpressionHasBeenSet() const { return m_searchConditionExpressionHasBeenSet; }
206 template <typename SearchConditionExpressionT = Aws::String>
207 void SetSearchConditionExpression(SearchConditionExpressionT&& value) {
208 m_searchConditionExpressionHasBeenSet = true;
209 m_searchConditionExpression = std::forward<SearchConditionExpressionT>(value);
210 }
211 template <typename SearchConditionExpressionT = Aws::String>
212 SearchVectorsRequest& WithSearchConditionExpression(SearchConditionExpressionT&& value) {
213 SetSearchConditionExpression(std::forward<SearchConditionExpressionT>(value));
214 return *this;
215 }
217
219
222 inline int GetTopK() const { return m_topK; }
223 inline bool TopKHasBeenSet() const { return m_topKHasBeenSet; }
224 inline void SetTopK(int value) {
225 m_topKHasBeenSet = true;
226 m_topK = value;
227 }
228 inline SearchVectorsRequest& WithTopK(int value) {
229 SetTopK(value);
230 return *this;
231 }
233 private:
234 Aws::String m_tableName;
235
236 Aws::String m_indexName;
237
239
240 Aws::Map<Aws::String, Aws::String> m_expressionAttributeNames;
241
242 Aws::Map<Aws::String, AttributeValue> m_expressionAttributeValues;
243
244 Aws::String m_projectionExpression;
245
246 Aws::Vector<AttributeValue> m_searchVector;
247
248 Aws::String m_searchConditionExpression;
249
250 int m_topK{0};
251 bool m_tableNameHasBeenSet = false;
252 bool m_indexNameHasBeenSet = false;
253 bool m_returnConsumedCapacityHasBeenSet = false;
254 bool m_expressionAttributeNamesHasBeenSet = false;
255 bool m_expressionAttributeValuesHasBeenSet = false;
256 bool m_projectionExpressionHasBeenSet = false;
257 bool m_searchVectorHasBeenSet = false;
258 bool m_searchConditionExpressionHasBeenSet = false;
259 bool m_topKHasBeenSet = false;
260};
261
262} // namespace Model
263} // namespace DynamoDB
264} // namespace Aws
Aws::Endpoint::EndpointParameters EndpointParameters
SearchVectorsRequest & AddExpressionAttributeValues(ExpressionAttributeValuesKeyT &&key, ExpressionAttributeValuesValueT &&value)
void SetReturnConsumedCapacity(ReturnConsumedCapacity value)
void SetExpressionAttributeNames(ExpressionAttributeNamesT &&value)
AWS_DYNAMODB_API SearchVectorsRequest()=default
SearchVectorsRequest & AddExpressionAttributeNames(ExpressionAttributeNamesKeyT &&key, ExpressionAttributeNamesValueT &&value)
ReturnConsumedCapacity GetReturnConsumedCapacity() const
SearchVectorsRequest & WithSearchConditionExpression(SearchConditionExpressionT &&value)
const Aws::Vector< AttributeValue > & GetSearchVector() const
virtual const char * GetServiceRequestName() const override
void SetProjectionExpression(ProjectionExpressionT &&value)
SearchVectorsRequest & WithSearchVector(SearchVectorT &&value)
SearchVectorsRequest & WithExpressionAttributeNames(ExpressionAttributeNamesT &&value)
const Aws::String & GetProjectionExpression() const
AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetExpressionAttributeValues(ExpressionAttributeValuesT &&value)
AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override
SearchVectorsRequest & WithIndexName(IndexNameT &&value)
void SetSearchConditionExpression(SearchConditionExpressionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetExpressionAttributeNames() const
SearchVectorsRequest & WithTableName(TableNameT &&value)
const Aws::String & GetSearchConditionExpression() const
SearchVectorsRequest & WithProjectionExpression(ProjectionExpressionT &&value)
const Aws::Map< Aws::String, AttributeValue > & GetExpressionAttributeValues() const
SearchVectorsRequest & WithExpressionAttributeValues(ExpressionAttributeValuesT &&value)
AWS_DYNAMODB_API Aws::String SerializePayload() const override
SearchVectorsRequest & AddSearchVector(SearchVectorT &&value)
SearchVectorsRequest & WithTopK(int value)
SearchVectorsRequest & WithReturnConsumedCapacity(ReturnConsumedCapacity value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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