AWS SDK for C++

AWS SDK for C++ Version 1.11.871

Loading...
Searching...
No Matches
CreateVectorIndexAction.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
33 public:
34 AWS_DYNAMODB_API CreateVectorIndexAction() = default;
37 AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetIndexName() const { return m_indexName; }
44 inline bool IndexNameHasBeenSet() const { return m_indexNameHasBeenSet; }
45 template <typename IndexNameT = Aws::String>
46 void SetIndexName(IndexNameT&& value) {
47 m_indexNameHasBeenSet = true;
48 m_indexName = std::forward<IndexNameT>(value);
49 }
50 template <typename IndexNameT = Aws::String>
52 SetIndexName(std::forward<IndexNameT>(value));
53 return *this;
54 }
56
58
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 CreateVectorIndexAction& 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 CreateVectorIndexAction& WithSearchSchema(SearchSchemaT&& value) {
91 SetSearchSchema(std::forward<SearchSchemaT>(value));
92 return *this;
93 }
94 template <typename SearchSchemaT = SearchSchemaElement>
95 CreateVectorIndexAction& 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>
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 CreateVectorIndexAction& WithDimensions(long long value) {
132 SetDimensions(value);
133 return *this;
134 }
136
138
142 inline VectorDistanceFunction GetDistanceFunction() const { return m_distanceFunction; }
143 inline bool DistanceFunctionHasBeenSet() const { return m_distanceFunctionHasBeenSet; }
145 m_distanceFunctionHasBeenSet = true;
146 m_distanceFunction = value;
147 }
149 SetDistanceFunction(value);
150 return *this;
151 }
153 private:
154 Aws::String m_indexName;
155
156 VectorAttributeDefinition m_vectorAttribute;
157
159
160 Projection m_projection;
161
162 long long m_dimensions{0};
163
165 bool m_indexNameHasBeenSet = false;
166 bool m_vectorAttributeHasBeenSet = false;
167 bool m_searchSchemaHasBeenSet = false;
168 bool m_projectionHasBeenSet = false;
169 bool m_dimensionsHasBeenSet = false;
170 bool m_distanceFunctionHasBeenSet = false;
171};
172
173} // namespace Model
174} // namespace DynamoDB
175} // namespace Aws
const VectorAttributeDefinition & GetVectorAttribute() const
CreateVectorIndexAction & WithDistanceFunction(VectorDistanceFunction value)
AWS_DYNAMODB_API CreateVectorIndexAction(Aws::Utils::Json::JsonView jsonValue)
AWS_DYNAMODB_API CreateVectorIndexAction & operator=(Aws::Utils::Json::JsonView jsonValue)
CreateVectorIndexAction & WithDimensions(long long value)
const Aws::Vector< SearchSchemaElement > & GetSearchSchema() const
CreateVectorIndexAction & WithSearchSchema(SearchSchemaT &&value)
CreateVectorIndexAction & AddSearchSchema(SearchSchemaT &&value)
AWS_DYNAMODB_API CreateVectorIndexAction()=default
CreateVectorIndexAction & WithVectorAttribute(VectorAttributeT &&value)
AWS_DYNAMODB_API Aws::Utils::Json::JsonValue Jsonize() const
CreateVectorIndexAction & WithProjection(ProjectionT &&value)
CreateVectorIndexAction & WithIndexName(IndexNameT &&value)
void SetDistanceFunction(VectorDistanceFunction value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue