AWS SDK for C++

AWS SDK for C++ Version 1.11.746

Loading...
Searching...
No Matches
SearchRequest.h
1
6#pragma once
7#include <aws/cloudsearchdomain/CloudSearchDomainRequest.h>
8#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
9#include <aws/cloudsearchdomain/model/QueryParser.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Http {
16class URI;
17} // namespace Http
18namespace CloudSearchDomain {
19namespace Model {
20
28 public:
29 AWS_CLOUDSEARCHDOMAIN_API SearchRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "Search"; }
36
37 AWS_CLOUDSEARCHDOMAIN_API Aws::String SerializePayload() const override;
38
39 AWS_CLOUDSEARCHDOMAIN_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
40
42
53 inline const Aws::String& GetCursor() const { return m_cursor; }
54 inline bool CursorHasBeenSet() const { return m_cursorHasBeenSet; }
55 template <typename CursorT = Aws::String>
56 void SetCursor(CursorT&& value) {
57 m_cursorHasBeenSet = true;
58 m_cursor = std::forward<CursorT>(value);
59 }
60 template <typename CursorT = Aws::String>
61 SearchRequest& WithCursor(CursorT&& value) {
62 SetCursor(std::forward<CursorT>(value));
63 return *this;
64 }
66
68
80 inline const Aws::String& GetExpr() const { return m_expr; }
81 inline bool ExprHasBeenSet() const { return m_exprHasBeenSet; }
82 template <typename ExprT = Aws::String>
83 void SetExpr(ExprT&& value) {
84 m_exprHasBeenSet = true;
85 m_expr = std::forward<ExprT>(value);
86 }
87 template <typename ExprT = Aws::String>
88 SearchRequest& WithExpr(ExprT&& value) {
89 SetExpr(std::forward<ExprT>(value));
90 return *this;
91 }
93
95
141 inline const Aws::String& GetFacet() const { return m_facet; }
142 inline bool FacetHasBeenSet() const { return m_facetHasBeenSet; }
143 template <typename FacetT = Aws::String>
144 void SetFacet(FacetT&& value) {
145 m_facetHasBeenSet = true;
146 m_facet = std::forward<FacetT>(value);
147 }
148 template <typename FacetT = Aws::String>
149 SearchRequest& WithFacet(FacetT&& value) {
150 SetFacet(std::forward<FacetT>(value));
151 return *this;
152 }
154
156
168 inline const Aws::String& GetFilterQuery() const { return m_filterQuery; }
169 inline bool FilterQueryHasBeenSet() const { return m_filterQueryHasBeenSet; }
170 template <typename FilterQueryT = Aws::String>
171 void SetFilterQuery(FilterQueryT&& value) {
172 m_filterQueryHasBeenSet = true;
173 m_filterQuery = std::forward<FilterQueryT>(value);
174 }
175 template <typename FilterQueryT = Aws::String>
176 SearchRequest& WithFilterQuery(FilterQueryT&& value) {
177 SetFilterQuery(std::forward<FilterQueryT>(value));
178 return *this;
179 }
181
183
209 inline const Aws::String& GetHighlight() const { return m_highlight; }
210 inline bool HighlightHasBeenSet() const { return m_highlightHasBeenSet; }
211 template <typename HighlightT = Aws::String>
212 void SetHighlight(HighlightT&& value) {
213 m_highlightHasBeenSet = true;
214 m_highlight = std::forward<HighlightT>(value);
215 }
216 template <typename HighlightT = Aws::String>
217 SearchRequest& WithHighlight(HighlightT&& value) {
218 SetHighlight(std::forward<HighlightT>(value));
219 return *this;
220 }
222
224
237 inline bool GetPartial() const { return m_partial; }
238 inline bool PartialHasBeenSet() const { return m_partialHasBeenSet; }
239 inline void SetPartial(bool value) {
240 m_partialHasBeenSet = true;
241 m_partial = value;
242 }
243 inline SearchRequest& WithPartial(bool value) {
244 SetPartial(value);
245 return *this;
246 }
248
250
261 inline const Aws::String& GetQuery() const { return m_query; }
262 inline bool QueryHasBeenSet() const { return m_queryHasBeenSet; }
263 template <typename QueryT = Aws::String>
264 void SetQuery(QueryT&& value) {
265 m_queryHasBeenSet = true;
266 m_query = std::forward<QueryT>(value);
267 }
268 template <typename QueryT = Aws::String>
269 SearchRequest& WithQuery(QueryT&& value) {
270 SetQuery(std::forward<QueryT>(value));
271 return *this;
272 }
274
276
369 inline const Aws::String& GetQueryOptions() const { return m_queryOptions; }
370 inline bool QueryOptionsHasBeenSet() const { return m_queryOptionsHasBeenSet; }
371 template <typename QueryOptionsT = Aws::String>
372 void SetQueryOptions(QueryOptionsT&& value) {
373 m_queryOptionsHasBeenSet = true;
374 m_queryOptions = std::forward<QueryOptionsT>(value);
375 }
376 template <typename QueryOptionsT = Aws::String>
377 SearchRequest& WithQueryOptions(QueryOptionsT&& value) {
378 SetQueryOptions(std::forward<QueryOptionsT>(value));
379 return *this;
380 }
382
384
418 inline QueryParser GetQueryParser() const { return m_queryParser; }
419 inline bool QueryParserHasBeenSet() const { return m_queryParserHasBeenSet; }
420 inline void SetQueryParser(QueryParser value) {
421 m_queryParserHasBeenSet = true;
422 m_queryParser = value;
423 }
425 SetQueryParser(value);
426 return *this;
427 }
429
431
439 inline const Aws::String& GetReturn() const { return m_return; }
440 inline bool ReturnHasBeenSet() const { return m_returnHasBeenSet; }
441 template <typename ReturnT = Aws::String>
442 void SetReturn(ReturnT&& value) {
443 m_returnHasBeenSet = true;
444 m_return = std::forward<ReturnT>(value);
445 }
446 template <typename ReturnT = Aws::String>
447 SearchRequest& WithReturn(ReturnT&& value) {
448 SetReturn(std::forward<ReturnT>(value));
449 return *this;
450 }
452
454
457 inline long long GetSize() const { return m_size; }
458 inline bool SizeHasBeenSet() const { return m_sizeHasBeenSet; }
459 inline void SetSize(long long value) {
460 m_sizeHasBeenSet = true;
461 m_size = value;
462 }
463 inline SearchRequest& WithSize(long long value) {
464 SetSize(value);
465 return *this;
466 }
468
470
484 inline const Aws::String& GetSort() const { return m_sort; }
485 inline bool SortHasBeenSet() const { return m_sortHasBeenSet; }
486 template <typename SortT = Aws::String>
487 void SetSort(SortT&& value) {
488 m_sortHasBeenSet = true;
489 m_sort = std::forward<SortT>(value);
490 }
491 template <typename SortT = Aws::String>
492 SearchRequest& WithSort(SortT&& value) {
493 SetSort(std::forward<SortT>(value));
494 return *this;
495 }
497
499
507 inline long long GetStart() const { return m_start; }
508 inline bool StartHasBeenSet() const { return m_startHasBeenSet; }
509 inline void SetStart(long long value) {
510 m_startHasBeenSet = true;
511 m_start = value;
512 }
513 inline SearchRequest& WithStart(long long value) {
514 SetStart(value);
515 return *this;
516 }
518
520
527 inline const Aws::String& GetStats() const { return m_stats; }
528 inline bool StatsHasBeenSet() const { return m_statsHasBeenSet; }
529 template <typename StatsT = Aws::String>
530 void SetStats(StatsT&& value) {
531 m_statsHasBeenSet = true;
532 m_stats = std::forward<StatsT>(value);
533 }
534 template <typename StatsT = Aws::String>
535 SearchRequest& WithStats(StatsT&& value) {
536 SetStats(std::forward<StatsT>(value));
537 return *this;
538 }
540 private:
541 Aws::String m_cursor;
542
543 Aws::String m_expr;
544
545 Aws::String m_facet;
546
547 Aws::String m_filterQuery;
548
549 Aws::String m_highlight;
550
551 bool m_partial{false};
552
553 Aws::String m_query;
554
555 Aws::String m_queryOptions;
556
557 QueryParser m_queryParser{QueryParser::NOT_SET};
558
559 Aws::String m_return;
560
561 long long m_size{0};
562
563 Aws::String m_sort;
564
565 long long m_start{0};
566
567 Aws::String m_stats;
568 bool m_cursorHasBeenSet = false;
569 bool m_exprHasBeenSet = false;
570 bool m_facetHasBeenSet = false;
571 bool m_filterQueryHasBeenSet = false;
572 bool m_highlightHasBeenSet = false;
573 bool m_partialHasBeenSet = false;
574 bool m_queryHasBeenSet = false;
575 bool m_queryOptionsHasBeenSet = false;
576 bool m_queryParserHasBeenSet = false;
577 bool m_returnHasBeenSet = false;
578 bool m_sizeHasBeenSet = false;
579 bool m_sortHasBeenSet = false;
580 bool m_startHasBeenSet = false;
581 bool m_statsHasBeenSet = false;
582};
583
584} // namespace Model
585} // namespace CloudSearchDomain
586} // namespace Aws
SearchRequest & WithHighlight(HighlightT &&value)
SearchRequest & WithSort(SortT &&value)
AWS_CLOUDSEARCHDOMAIN_API SearchRequest()=default
void SetQueryOptions(QueryOptionsT &&value)
SearchRequest & WithSize(long long value)
SearchRequest & WithExpr(ExprT &&value)
SearchRequest & WithFilterQuery(FilterQueryT &&value)
SearchRequest & WithStart(long long value)
const Aws::String & GetQueryOptions() const
SearchRequest & WithReturn(ReturnT &&value)
const Aws::String & GetFilterQuery() const
SearchRequest & WithQueryParser(QueryParser value)
SearchRequest & WithQuery(QueryT &&value)
SearchRequest & WithCursor(CursorT &&value)
virtual const char * GetServiceRequestName() const override
AWS_CLOUDSEARCHDOMAIN_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
SearchRequest & WithQueryOptions(QueryOptionsT &&value)
SearchRequest & WithStats(StatsT &&value)
SearchRequest & WithFacet(FacetT &&value)
AWS_CLOUDSEARCHDOMAIN_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String