AWS SDK for C++

AWS SDK for C++ Version 1.11.870

Loading...
Searching...
No Matches
VectorIndex.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/dynamodb/DynamoDB_EXPORTS.h>
10#include <aws/dynamodb/model/Projection.h>
11#include <aws/dynamodb/model/SearchSchemaElement.h>
12#include <aws/dynamodb/model/VectorAttributeDefinition.h>
13#include <aws/dynamodb/model/VectorDistanceFunction.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace DynamoDB {
25namespace Model {
26
35 public:
36 AWS_DYNAMODB_API VectorIndex() = default;
37 AWS_DYNAMODB_API VectorIndex(Aws::Utils::Json::JsonView jsonValue);
38 AWS_DYNAMODB_API VectorIndex& operator=(Aws::Utils::Json::JsonView jsonValue);
39 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline const Aws::String& GetIndexName() const { return m_indexName; }
46 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
47 template <typename IndexNameT = Aws::String>
48 void SetIndexName(IndexNameT&& value) {
49 m_indexNameHasBeenSet = true;
50 m_indexName = std::forward<IndexNameT>(value);
51 }
52 template <typename IndexNameT = Aws::String>
53 VectorIndex& WithIndexName(IndexNameT&& value) {
54 SetIndexName(std::forward<IndexNameT>(value));
55 return *this;
56 }
58
60
63 inline const VectorAttributeDefinition& GetVectorAttribute() const { return m_vectorAttribute; }
64 inline bool VectorAttributeHasBeenSet() const { return m_vectorAttributeHasBeenSet; }
65 template <typename VectorAttributeT = VectorAttributeDefinition>
66 void SetVectorAttribute(VectorAttributeT&& value) {
67 m_vectorAttributeHasBeenSet = true;
68 m_vectorAttribute = std::forward<VectorAttributeT>(value);
69 }
70 template <typename VectorAttributeT = VectorAttributeDefinition>
71 VectorIndex& WithVectorAttribute(VectorAttributeT&& value) {
72 SetVectorAttribute(std::forward<VectorAttributeT>(value));
73 return *this;
74 }
76
78
82 inline const Aws::Vector<SearchSchemaElement>& GetSearchSchema() const { return m_searchSchema; }
83 inline bool SearchSchemaHasBeenSet() const { return m_searchSchemaHasBeenSet; }
84 template <typename SearchSchemaT = Aws::Vector<SearchSchemaElement>>
85 void SetSearchSchema(SearchSchemaT&& value) {
86 m_searchSchemaHasBeenSet = true;
87 m_searchSchema = std::forward<SearchSchemaT>(value);
88 }
89 template <typename SearchSchemaT = Aws::Vector<SearchSchemaElement>>
90 VectorIndex& WithSearchSchema(SearchSchemaT&& value) {
91 SetSearchSchema(std::forward<SearchSchemaT>(value));
92 return *this;
93 }
94 template <typename SearchSchemaT = SearchSchemaElement>
95 VectorIndex& AddSearchSchema(SearchSchemaT&& value) {
96 m_searchSchemaHasBeenSet = true;
97 m_searchSchema.emplace_back(std::forward<SearchSchemaT>(value));
98 return *this;
99 }
101
103
107 inline const Projection& GetProjection() const { return m_projection; }
108 inline bool ProjectionHasBeenSet() const { return m_projectionHasBeenSet; }
109 template <typename ProjectionT = Projection>
110 void SetProjection(ProjectionT&& value) {
111 m_projectionHasBeenSet = true;
112 m_projection = std::forward<ProjectionT>(value);
113 }
114 template <typename ProjectionT = Projection>
115 VectorIndex& WithProjection(ProjectionT&& value) {
116 SetProjection(std::forward<ProjectionT>(value));
117 return *this;
118 }
120
122
125 inline long long GetDimensions() const { return m_dimensions; }
126 inline bool DimensionsHasBeenSet() const { return m_dimensionsHasBeenSet; }
127 inline void SetDimensions(long long value) {
128 m_dimensionsHasBeenSet = true;
129 m_dimensions = value;
130 }
131 inline VectorIndex& WithDimensions(long long value) {
132 SetDimensions(value);
133 return *this;
134 }
136
138
143 inline VectorDistanceFunction GetDistanceFunction() const { return m_distanceFunction; }
144 inline bool DistanceFunctionHasBeenSet() const { return m_distanceFunctionHasBeenSet; }
146 m_distanceFunctionHasBeenSet = true;
147 m_distanceFunction = value;
148 }
150 SetDistanceFunction(value);
151 return *this;
152 }
154 private:
155 Aws::String m_indexName;
156
157 VectorAttributeDefinition m_vectorAttribute;
158
160
161 Projection m_projection;
162
163 long long m_dimensions{0};
164
166 bool m_indexNameHasBeenSet = false;
167 bool m_vectorAttributeHasBeenSet = false;
168 bool m_searchSchemaHasBeenSet = false;
169 bool m_projectionHasBeenSet = false;
170 bool m_dimensionsHasBeenSet = false;
171 bool m_distanceFunctionHasBeenSet = false;
172};
173
174} // namespace Model
175} // namespace DynamoDB
176} // namespace Aws
void SetDistanceFunction(VectorDistanceFunction value)
const Projection & GetProjection() const
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
VectorIndex & WithIndexName(IndexNameT &&value)
Definition VectorIndex.h:53
VectorIndex & WithVectorAttribute(VectorAttributeT &&value)
Definition VectorIndex.h:71
VectorIndex & WithDistanceFunction(VectorDistanceFunction value)
const Aws::Vector< SearchSchemaElement > & GetSearchSchema() const
Definition VectorIndex.h:82
VectorIndex & WithSearchSchema(SearchSchemaT &&value)
Definition VectorIndex.h:90
AWS_DYNAMODB_API VectorIndex()=default
const VectorAttributeDefinition & GetVectorAttribute() const
Definition VectorIndex.h:63
void SetSearchSchema(SearchSchemaT &&value)
Definition VectorIndex.h:85
const Aws::String & GetIndexName() const
Definition VectorIndex.h:45
VectorDistanceFunction GetDistanceFunction() const
VectorIndex & AddSearchSchema(SearchSchemaT &&value)
Definition VectorIndex.h:95
VectorIndex & WithDimensions(long long value)
void SetProjection(ProjectionT &&value)
void SetDimensions(long long value)
VectorIndex & WithProjection(ProjectionT &&value)
void SetVectorAttribute(VectorAttributeT &&value)
Definition VectorIndex.h:66
AWS_DYNAMODB_API VectorIndex & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_DYNAMODB_API VectorIndex(Aws::Utils::Json::JsonView jsonValue)
void SetIndexName(IndexNameT &&value)
Definition VectorIndex.h:48
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue