AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
SearchResult.h
1
6#pragma once
7#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
8#include <aws/cloudsearchdomain/model/BucketInfo.h>
9#include <aws/cloudsearchdomain/model/FieldStats.h>
10#include <aws/cloudsearchdomain/model/Hits.h>
11#include <aws/cloudsearchdomain/model/SearchStatus.h>
12#include <aws/core/http/HttpResponse.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15
16#include <utility>
17
18namespace Aws {
19template <typename RESULT_TYPE>
20class AmazonWebServiceResult;
21
22namespace Utils {
23namespace Json {
24class JsonValue;
25} // namespace Json
26} // namespace Utils
27namespace CloudSearchDomain {
28namespace Model {
37 public:
38 AWS_CLOUDSEARCHDOMAIN_API SearchResult() = default;
41
43
46 inline const SearchStatus& GetStatus() const { return m_status; }
47 template <typename StatusT = SearchStatus>
48 void SetStatus(StatusT&& value) {
49 m_statusHasBeenSet = true;
50 m_status = std::forward<StatusT>(value);
51 }
52 template <typename StatusT = SearchStatus>
53 SearchResult& WithStatus(StatusT&& value) {
54 SetStatus(std::forward<StatusT>(value));
55 return *this;
56 }
58
60
63 inline const Hits& GetHits() const { return m_hits; }
64 template <typename HitsT = Hits>
65 void SetHits(HitsT&& value) {
66 m_hitsHasBeenSet = true;
67 m_hits = std::forward<HitsT>(value);
68 }
69 template <typename HitsT = Hits>
70 SearchResult& WithHits(HitsT&& value) {
71 SetHits(std::forward<HitsT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::Map<Aws::String, BucketInfo>& GetFacets() const { return m_facets; }
81 template <typename FacetsT = Aws::Map<Aws::String, BucketInfo>>
82 void SetFacets(FacetsT&& value) {
83 m_facetsHasBeenSet = true;
84 m_facets = std::forward<FacetsT>(value);
85 }
86 template <typename FacetsT = Aws::Map<Aws::String, BucketInfo>>
87 SearchResult& WithFacets(FacetsT&& value) {
88 SetFacets(std::forward<FacetsT>(value));
89 return *this;
90 }
91 template <typename FacetsKeyT = Aws::String, typename FacetsValueT = BucketInfo>
92 SearchResult& AddFacets(FacetsKeyT&& key, FacetsValueT&& value) {
93 m_facetsHasBeenSet = true;
94 m_facets.emplace(std::forward<FacetsKeyT>(key), std::forward<FacetsValueT>(value));
95 return *this;
96 }
98
100
103 inline const Aws::Map<Aws::String, FieldStats>& GetStats() const { return m_stats; }
104 template <typename StatsT = Aws::Map<Aws::String, FieldStats>>
105 void SetStats(StatsT&& value) {
106 m_statsHasBeenSet = true;
107 m_stats = std::forward<StatsT>(value);
108 }
109 template <typename StatsT = Aws::Map<Aws::String, FieldStats>>
110 SearchResult& WithStats(StatsT&& value) {
111 SetStats(std::forward<StatsT>(value));
112 return *this;
113 }
114 template <typename StatsKeyT = Aws::String, typename StatsValueT = FieldStats>
115 SearchResult& AddStats(StatsKeyT&& key, StatsValueT&& value) {
116 m_statsHasBeenSet = true;
117 m_stats.emplace(std::forward<StatsKeyT>(key), std::forward<StatsValueT>(value));
118 return *this;
119 }
121
123
124 inline const Aws::String& GetRequestId() const { return m_requestId; }
125 template <typename RequestIdT = Aws::String>
126 void SetRequestId(RequestIdT&& value) {
127 m_requestIdHasBeenSet = true;
128 m_requestId = std::forward<RequestIdT>(value);
129 }
130 template <typename RequestIdT = Aws::String>
131 SearchResult& WithRequestId(RequestIdT&& value) {
132 SetRequestId(std::forward<RequestIdT>(value));
133 return *this;
134 }
136 inline Aws::Http::HttpResponseCode GetHttpResponseCode() const { return m_HttpResponseCode; }
137
138 private:
139 SearchStatus m_status;
140
141 Hits m_hits;
142
144
146
147 Aws::String m_requestId;
148 Aws::Http::HttpResponseCode m_HttpResponseCode;
149 bool m_statusHasBeenSet = false;
150 bool m_hitsHasBeenSet = false;
151 bool m_facetsHasBeenSet = false;
152 bool m_statsHasBeenSet = false;
153 bool m_requestIdHasBeenSet = false;
154};
155
156} // namespace Model
157} // namespace CloudSearchDomain
158} // namespace Aws
AWS_CLOUDSEARCHDOMAIN_API SearchResult & operator=(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
SearchResult & WithStatus(StatusT &&value)
AWS_CLOUDSEARCHDOMAIN_API SearchResult()=default
AWS_CLOUDSEARCHDOMAIN_API SearchResult(const Aws::AmazonWebServiceResult< Aws::Utils::Json::JsonValue > &result)
const SearchStatus & GetStatus() const
SearchResult & WithFacets(FacetsT &&value)
SearchResult & AddFacets(FacetsKeyT &&key, FacetsValueT &&value)
Aws::Http::HttpResponseCode GetHttpResponseCode() const
SearchResult & WithRequestId(RequestIdT &&value)
const Aws::Map< Aws::String, FieldStats > & GetStats() const
SearchResult & AddStats(StatsKeyT &&key, StatsValueT &&value)
SearchResult & WithHits(HitsT &&value)
const Aws::Map< Aws::String, BucketInfo > & GetFacets() const
SearchResult & WithStats(StatsT &&value)
const Aws::String & GetRequestId() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue