AWS SDK for C++

AWS SDK for C++ Version 1.11.608

Loading...
Searching...
No Matches
QueryResult.h
1
6#pragma once
7#include <aws/kendra/Kendra_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/kendra/model/QueryResultItem.h>
11#include <aws/kendra/model/FacetResult.h>
12#include <aws/kendra/model/Warning.h>
13#include <aws/kendra/model/SpellCorrectedQuery.h>
14#include <aws/kendra/model/FeaturedResultsItem.h>
15#include <utility>
16
17namespace Aws
18{
19template<typename RESULT_TYPE>
20class AmazonWebServiceResult;
21
22namespace Utils
23{
24namespace Json
25{
26 class JsonValue;
27} // namespace Json
28} // namespace Utils
29namespace kendra
30{
31namespace Model
32{
34 {
35 public:
36 AWS_KENDRA_API QueryResult() = default;
39
40
42
48 inline const Aws::String& GetQueryId() const { return m_queryId; }
49 template<typename QueryIdT = Aws::String>
50 void SetQueryId(QueryIdT&& value) { m_queryIdHasBeenSet = true; m_queryId = std::forward<QueryIdT>(value); }
51 template<typename QueryIdT = Aws::String>
52 QueryResult& WithQueryId(QueryIdT&& value) { SetQueryId(std::forward<QueryIdT>(value)); return *this;}
54
56
59 inline const Aws::Vector<QueryResultItem>& GetResultItems() const { return m_resultItems; }
60 template<typename ResultItemsT = Aws::Vector<QueryResultItem>>
61 void SetResultItems(ResultItemsT&& value) { m_resultItemsHasBeenSet = true; m_resultItems = std::forward<ResultItemsT>(value); }
62 template<typename ResultItemsT = Aws::Vector<QueryResultItem>>
63 QueryResult& WithResultItems(ResultItemsT&& value) { SetResultItems(std::forward<ResultItemsT>(value)); return *this;}
64 template<typename ResultItemsT = QueryResultItem>
65 QueryResult& AddResultItems(ResultItemsT&& value) { m_resultItemsHasBeenSet = true; m_resultItems.emplace_back(std::forward<ResultItemsT>(value)); return *this; }
67
69
74 inline const Aws::Vector<FacetResult>& GetFacetResults() const { return m_facetResults; }
75 template<typename FacetResultsT = Aws::Vector<FacetResult>>
76 void SetFacetResults(FacetResultsT&& value) { m_facetResultsHasBeenSet = true; m_facetResults = std::forward<FacetResultsT>(value); }
77 template<typename FacetResultsT = Aws::Vector<FacetResult>>
78 QueryResult& WithFacetResults(FacetResultsT&& value) { SetFacetResults(std::forward<FacetResultsT>(value)); return *this;}
79 template<typename FacetResultsT = FacetResult>
80 QueryResult& AddFacetResults(FacetResultsT&& value) { m_facetResultsHasBeenSet = true; m_facetResults.emplace_back(std::forward<FacetResultsT>(value)); return *this; }
82
84
89 inline int GetTotalNumberOfResults() const { return m_totalNumberOfResults; }
90 inline void SetTotalNumberOfResults(int value) { m_totalNumberOfResultsHasBeenSet = true; m_totalNumberOfResults = value; }
91 inline QueryResult& WithTotalNumberOfResults(int value) { SetTotalNumberOfResults(value); return *this;}
93
95
103 inline const Aws::Vector<Warning>& GetWarnings() const { return m_warnings; }
104 template<typename WarningsT = Aws::Vector<Warning>>
105 void SetWarnings(WarningsT&& value) { m_warningsHasBeenSet = true; m_warnings = std::forward<WarningsT>(value); }
106 template<typename WarningsT = Aws::Vector<Warning>>
107 QueryResult& WithWarnings(WarningsT&& value) { SetWarnings(std::forward<WarningsT>(value)); return *this;}
108 template<typename WarningsT = Warning>
109 QueryResult& AddWarnings(WarningsT&& value) { m_warningsHasBeenSet = true; m_warnings.emplace_back(std::forward<WarningsT>(value)); return *this; }
111
113
116 inline const Aws::Vector<SpellCorrectedQuery>& GetSpellCorrectedQueries() const { return m_spellCorrectedQueries; }
117 template<typename SpellCorrectedQueriesT = Aws::Vector<SpellCorrectedQuery>>
118 void SetSpellCorrectedQueries(SpellCorrectedQueriesT&& value) { m_spellCorrectedQueriesHasBeenSet = true; m_spellCorrectedQueries = std::forward<SpellCorrectedQueriesT>(value); }
119 template<typename SpellCorrectedQueriesT = Aws::Vector<SpellCorrectedQuery>>
120 QueryResult& WithSpellCorrectedQueries(SpellCorrectedQueriesT&& value) { SetSpellCorrectedQueries(std::forward<SpellCorrectedQueriesT>(value)); return *this;}
121 template<typename SpellCorrectedQueriesT = SpellCorrectedQuery>
122 QueryResult& AddSpellCorrectedQueries(SpellCorrectedQueriesT&& value) { m_spellCorrectedQueriesHasBeenSet = true; m_spellCorrectedQueries.emplace_back(std::forward<SpellCorrectedQueriesT>(value)); return *this; }
124
126
132 inline const Aws::Vector<FeaturedResultsItem>& GetFeaturedResultsItems() const { return m_featuredResultsItems; }
133 template<typename FeaturedResultsItemsT = Aws::Vector<FeaturedResultsItem>>
134 void SetFeaturedResultsItems(FeaturedResultsItemsT&& value) { m_featuredResultsItemsHasBeenSet = true; m_featuredResultsItems = std::forward<FeaturedResultsItemsT>(value); }
135 template<typename FeaturedResultsItemsT = Aws::Vector<FeaturedResultsItem>>
136 QueryResult& WithFeaturedResultsItems(FeaturedResultsItemsT&& value) { SetFeaturedResultsItems(std::forward<FeaturedResultsItemsT>(value)); return *this;}
137 template<typename FeaturedResultsItemsT = FeaturedResultsItem>
138 QueryResult& AddFeaturedResultsItems(FeaturedResultsItemsT&& value) { m_featuredResultsItemsHasBeenSet = true; m_featuredResultsItems.emplace_back(std::forward<FeaturedResultsItemsT>(value)); return *this; }
140
142
143 inline const Aws::String& GetRequestId() const { return m_requestId; }
144 template<typename RequestIdT = Aws::String>
145 void SetRequestId(RequestIdT&& value) { m_requestIdHasBeenSet = true; m_requestId = std::forward<RequestIdT>(value); }
146 template<typename RequestIdT = Aws::String>
147 QueryResult& WithRequestId(RequestIdT&& value) { SetRequestId(std::forward<RequestIdT>(value)); return *this;}
149 private:
150
151 Aws::String m_queryId;
152 bool m_queryIdHasBeenSet = false;
153
154 Aws::Vector<QueryResultItem> m_resultItems;
155 bool m_resultItemsHasBeenSet = false;
156
157 Aws::Vector<FacetResult> m_facetResults;
158 bool m_facetResultsHasBeenSet = false;
159
160 int m_totalNumberOfResults{0};
161 bool m_totalNumberOfResultsHasBeenSet = false;
162
163 Aws::Vector<Warning> m_warnings;
164 bool m_warningsHasBeenSet = false;
165
166 Aws::Vector<SpellCorrectedQuery> m_spellCorrectedQueries;
167 bool m_spellCorrectedQueriesHasBeenSet = false;
168
169 Aws::Vector<FeaturedResultsItem> m_featuredResultsItems;
170 bool m_featuredResultsItemsHasBeenSet = false;
171
172 Aws::String m_requestId;
173 bool m_requestIdHasBeenSet = false;
174 };
175
176} // namespace Model
177} // namespace kendra
178} // namespace Aws
void SetWarnings(WarningsT &&value)
void SetQueryId(QueryIdT &&value)
Definition QueryResult.h:50
QueryResult & WithFacetResults(FacetResultsT &&value)
Definition QueryResult.h:78
void SetSpellCorrectedQueries(SpellCorrectedQueriesT &&value)
const Aws::Vector< Warning > & GetWarnings() const
const Aws::Vector< QueryResultItem > & GetResultItems() const
Definition QueryResult.h:59
const Aws::Vector< FeaturedResultsItem > & GetFeaturedResultsItems() const
AWS_KENDRA_API QueryResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
QueryResult & AddFeaturedResultsItems(FeaturedResultsItemsT &&value)
AWS_KENDRA_API QueryResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
const Aws::String & GetQueryId() const
Definition QueryResult.h:48
QueryResult & WithResultItems(ResultItemsT &&value)
Definition QueryResult.h:63
QueryResult & WithTotalNumberOfResults(int value)
Definition QueryResult.h:91
void SetTotalNumberOfResults(int value)
Definition QueryResult.h:90
void SetFacetResults(FacetResultsT &&value)
Definition QueryResult.h:76
QueryResult & WithFeaturedResultsItems(FeaturedResultsItemsT &&value)
const Aws::String & GetRequestId() const
AWS_KENDRA_API QueryResult()=default
const Aws::Vector< FacetResult > & GetFacetResults() const
Definition QueryResult.h:74
const Aws::Vector< SpellCorrectedQuery > & GetSpellCorrectedQueries() const
void SetRequestId(RequestIdT &&value)
QueryResult & WithWarnings(WarningsT &&value)
QueryResult & WithRequestId(RequestIdT &&value)
QueryResult & WithSpellCorrectedQueries(SpellCorrectedQueriesT &&value)
QueryResult & AddResultItems(ResultItemsT &&value)
Definition QueryResult.h:65
void SetFeaturedResultsItems(FeaturedResultsItemsT &&value)
void SetResultItems(ResultItemsT &&value)
Definition QueryResult.h:61
QueryResult & WithQueryId(QueryIdT &&value)
Definition QueryResult.h:52
QueryResult & AddFacetResults(FacetResultsT &&value)
Definition QueryResult.h:80
QueryResult & AddSpellCorrectedQueries(SpellCorrectedQueriesT &&value)
QueryResult & AddWarnings(WarningsT &&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