AWS SDK for C++

AWS SDK for C++ Version 1.11.681

Loading...
Searching...
No Matches
RetrieveRequest.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/kendra/KendraRequest.h>
10#include <aws/kendra/Kendra_EXPORTS.h>
11#include <aws/kendra/model/AttributeFilter.h>
12#include <aws/kendra/model/DocumentRelevanceConfiguration.h>
13#include <aws/kendra/model/UserContext.h>
14
15#include <utility>
16
17namespace Aws {
18namespace kendra {
19namespace Model {
20
24 public:
25 AWS_KENDRA_API RetrieveRequest() = 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 "Retrieve"; }
32
33 AWS_KENDRA_API Aws::String SerializePayload() const override;
34
36
38
41 inline const Aws::String& GetIndexId() const { return m_indexId; }
42 inline bool IndexIdHasBeenSet() const { return m_indexIdHasBeenSet; }
43 template <typename IndexIdT = Aws::String>
44 void SetIndexId(IndexIdT&& value) {
45 m_indexIdHasBeenSet = true;
46 m_indexId = std::forward<IndexIdT>(value);
47 }
48 template <typename IndexIdT = Aws::String>
49 RetrieveRequest& WithIndexId(IndexIdT&& value) {
50 SetIndexId(std::forward<IndexIdT>(value));
51 return *this;
52 }
54
56
66 inline const Aws::String& GetQueryText() const { return m_queryText; }
67 inline bool QueryTextHasBeenSet() const { return m_queryTextHasBeenSet; }
68 template <typename QueryTextT = Aws::String>
69 void SetQueryText(QueryTextT&& value) {
70 m_queryTextHasBeenSet = true;
71 m_queryText = std::forward<QueryTextT>(value);
72 }
73 template <typename QueryTextT = Aws::String>
74 RetrieveRequest& WithQueryText(QueryTextT&& value) {
75 SetQueryText(std::forward<QueryTextT>(value));
76 return *this;
77 }
79
81
92 inline const AttributeFilter& GetAttributeFilter() const { return m_attributeFilter; }
93 inline bool AttributeFilterHasBeenSet() const { return m_attributeFilterHasBeenSet; }
94 template <typename AttributeFilterT = AttributeFilter>
95 void SetAttributeFilter(AttributeFilterT&& value) {
96 m_attributeFilterHasBeenSet = true;
97 m_attributeFilter = std::forward<AttributeFilterT>(value);
98 }
99 template <typename AttributeFilterT = AttributeFilter>
100 RetrieveRequest& WithAttributeFilter(AttributeFilterT&& value) {
101 SetAttributeFilter(std::forward<AttributeFilterT>(value));
102 return *this;
103 }
105
107
112 inline const Aws::Vector<Aws::String>& GetRequestedDocumentAttributes() const { return m_requestedDocumentAttributes; }
113 inline bool RequestedDocumentAttributesHasBeenSet() const { return m_requestedDocumentAttributesHasBeenSet; }
114 template <typename RequestedDocumentAttributesT = Aws::Vector<Aws::String>>
115 void SetRequestedDocumentAttributes(RequestedDocumentAttributesT&& value) {
116 m_requestedDocumentAttributesHasBeenSet = true;
117 m_requestedDocumentAttributes = std::forward<RequestedDocumentAttributesT>(value);
118 }
119 template <typename RequestedDocumentAttributesT = Aws::Vector<Aws::String>>
120 RetrieveRequest& WithRequestedDocumentAttributes(RequestedDocumentAttributesT&& value) {
121 SetRequestedDocumentAttributes(std::forward<RequestedDocumentAttributesT>(value));
122 return *this;
123 }
124 template <typename RequestedDocumentAttributesT = Aws::String>
125 RetrieveRequest& AddRequestedDocumentAttributes(RequestedDocumentAttributesT&& value) {
126 m_requestedDocumentAttributesHasBeenSet = true;
127 m_requestedDocumentAttributes.emplace_back(std::forward<RequestedDocumentAttributesT>(value));
128 return *this;
129 }
131
133
143 return m_documentRelevanceOverrideConfigurations;
144 }
145 inline bool DocumentRelevanceOverrideConfigurationsHasBeenSet() const { return m_documentRelevanceOverrideConfigurationsHasBeenSet; }
146 template <typename DocumentRelevanceOverrideConfigurationsT = Aws::Vector<DocumentRelevanceConfiguration>>
147 void SetDocumentRelevanceOverrideConfigurations(DocumentRelevanceOverrideConfigurationsT&& value) {
148 m_documentRelevanceOverrideConfigurationsHasBeenSet = true;
149 m_documentRelevanceOverrideConfigurations = std::forward<DocumentRelevanceOverrideConfigurationsT>(value);
150 }
151 template <typename DocumentRelevanceOverrideConfigurationsT = Aws::Vector<DocumentRelevanceConfiguration>>
152 RetrieveRequest& WithDocumentRelevanceOverrideConfigurations(DocumentRelevanceOverrideConfigurationsT&& value) {
153 SetDocumentRelevanceOverrideConfigurations(std::forward<DocumentRelevanceOverrideConfigurationsT>(value));
154 return *this;
155 }
156 template <typename DocumentRelevanceOverrideConfigurationsT = DocumentRelevanceConfiguration>
157 RetrieveRequest& AddDocumentRelevanceOverrideConfigurations(DocumentRelevanceOverrideConfigurationsT&& value) {
158 m_documentRelevanceOverrideConfigurationsHasBeenSet = true;
159 m_documentRelevanceOverrideConfigurations.emplace_back(std::forward<DocumentRelevanceOverrideConfigurationsT>(value));
160 return *this;
161 }
163
165
170 inline int GetPageNumber() const { return m_pageNumber; }
171 inline bool PageNumberHasBeenSet() const { return m_pageNumberHasBeenSet; }
172 inline void SetPageNumber(int value) {
173 m_pageNumberHasBeenSet = true;
174 m_pageNumber = value;
175 }
176 inline RetrieveRequest& WithPageNumber(int value) {
177 SetPageNumber(value);
178 return *this;
179 }
181
183
188 inline int GetPageSize() const { return m_pageSize; }
189 inline bool PageSizeHasBeenSet() const { return m_pageSizeHasBeenSet; }
190 inline void SetPageSize(int value) {
191 m_pageSizeHasBeenSet = true;
192 m_pageSize = value;
193 }
194 inline RetrieveRequest& WithPageSize(int value) {
195 SetPageSize(value);
196 return *this;
197 }
199
201
204 inline const UserContext& GetUserContext() const { return m_userContext; }
205 inline bool UserContextHasBeenSet() const { return m_userContextHasBeenSet; }
206 template <typename UserContextT = UserContext>
207 void SetUserContext(UserContextT&& value) {
208 m_userContextHasBeenSet = true;
209 m_userContext = std::forward<UserContextT>(value);
210 }
211 template <typename UserContextT = UserContext>
212 RetrieveRequest& WithUserContext(UserContextT&& value) {
213 SetUserContext(std::forward<UserContextT>(value));
214 return *this;
215 }
217 private:
218 Aws::String m_indexId;
219 bool m_indexIdHasBeenSet = false;
220
221 Aws::String m_queryText;
222 bool m_queryTextHasBeenSet = false;
223
224 AttributeFilter m_attributeFilter;
225 bool m_attributeFilterHasBeenSet = false;
226
227 Aws::Vector<Aws::String> m_requestedDocumentAttributes;
228 bool m_requestedDocumentAttributesHasBeenSet = false;
229
230 Aws::Vector<DocumentRelevanceConfiguration> m_documentRelevanceOverrideConfigurations;
231 bool m_documentRelevanceOverrideConfigurationsHasBeenSet = false;
232
233 int m_pageNumber{0};
234 bool m_pageNumberHasBeenSet = false;
235
236 int m_pageSize{0};
237 bool m_pageSizeHasBeenSet = false;
238
239 UserContext m_userContext;
240 bool m_userContextHasBeenSet = false;
241};
242
243} // namespace Model
244} // namespace kendra
245} // namespace Aws
RetrieveRequest & WithPageNumber(int value)
void SetRequestedDocumentAttributes(RequestedDocumentAttributesT &&value)
const AttributeFilter & GetAttributeFilter() const
RetrieveRequest & WithRequestedDocumentAttributes(RequestedDocumentAttributesT &&value)
RetrieveRequest & AddRequestedDocumentAttributes(RequestedDocumentAttributesT &&value)
void SetUserContext(UserContextT &&value)
void SetQueryText(QueryTextT &&value)
RetrieveRequest & AddDocumentRelevanceOverrideConfigurations(DocumentRelevanceOverrideConfigurationsT &&value)
RetrieveRequest & WithQueryText(QueryTextT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::String & GetIndexId() const
void SetDocumentRelevanceOverrideConfigurations(DocumentRelevanceOverrideConfigurationsT &&value)
const Aws::String & GetQueryText() const
bool DocumentRelevanceOverrideConfigurationsHasBeenSet() const
AWS_KENDRA_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_KENDRA_API RetrieveRequest()=default
const Aws::Vector< Aws::String > & GetRequestedDocumentAttributes() const
RetrieveRequest & WithDocumentRelevanceOverrideConfigurations(DocumentRelevanceOverrideConfigurationsT &&value)
AWS_KENDRA_API Aws::String SerializePayload() const override
const UserContext & GetUserContext() const
RetrieveRequest & WithIndexId(IndexIdT &&value)
void SetAttributeFilter(AttributeFilterT &&value)
const Aws::Vector< DocumentRelevanceConfiguration > & GetDocumentRelevanceOverrideConfigurations() const
RetrieveRequest & WithUserContext(UserContextT &&value)
RetrieveRequest & WithAttributeFilter(AttributeFilterT &&value)
RetrieveRequest & WithPageSize(int value)
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