AWS SDK for C++

AWS SDK for C++ Version 1.11.745

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/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14
15#include <utility>
16
17namespace Aws {
18template <typename RESULT_TYPE>
19class AmazonWebServiceResult;
20
21namespace Utils {
22namespace Json {
23class JsonValue;
24} // namespace Json
25} // namespace Utils
26namespace CloudSearchDomain {
27namespace Model {
36 public:
37 AWS_CLOUDSEARCHDOMAIN_API SearchResult() = default;
40
42
45 inline const SearchStatus& GetStatus() const { return m_status; }
46 template <typename StatusT = SearchStatus>
47 void SetStatus(StatusT&& value) {
48 m_statusHasBeenSet = true;
49 m_status = std::forward<StatusT>(value);
50 }
51 template <typename StatusT = SearchStatus>
52 SearchResult& WithStatus(StatusT&& value) {
53 SetStatus(std::forward<StatusT>(value));
54 return *this;
55 }
57
59
62 inline const Hits& GetHits() const { return m_hits; }
63 template <typename HitsT = Hits>
64 void SetHits(HitsT&& value) {
65 m_hitsHasBeenSet = true;
66 m_hits = std::forward<HitsT>(value);
67 }
68 template <typename HitsT = Hits>
69 SearchResult& WithHits(HitsT&& value) {
70 SetHits(std::forward<HitsT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::Map<Aws::String, BucketInfo>& GetFacets() const { return m_facets; }
80 template <typename FacetsT = Aws::Map<Aws::String, BucketInfo>>
81 void SetFacets(FacetsT&& value) {
82 m_facetsHasBeenSet = true;
83 m_facets = std::forward<FacetsT>(value);
84 }
85 template <typename FacetsT = Aws::Map<Aws::String, BucketInfo>>
86 SearchResult& WithFacets(FacetsT&& value) {
87 SetFacets(std::forward<FacetsT>(value));
88 return *this;
89 }
90 template <typename FacetsKeyT = Aws::String, typename FacetsValueT = BucketInfo>
91 SearchResult& AddFacets(FacetsKeyT&& key, FacetsValueT&& value) {
92 m_facetsHasBeenSet = true;
93 m_facets.emplace(std::forward<FacetsKeyT>(key), std::forward<FacetsValueT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::Map<Aws::String, FieldStats>& GetStats() const { return m_stats; }
103 template <typename StatsT = Aws::Map<Aws::String, FieldStats>>
104 void SetStats(StatsT&& value) {
105 m_statsHasBeenSet = true;
106 m_stats = std::forward<StatsT>(value);
107 }
108 template <typename StatsT = Aws::Map<Aws::String, FieldStats>>
109 SearchResult& WithStats(StatsT&& value) {
110 SetStats(std::forward<StatsT>(value));
111 return *this;
112 }
113 template <typename StatsKeyT = Aws::String, typename StatsValueT = FieldStats>
114 SearchResult& AddStats(StatsKeyT&& key, StatsValueT&& value) {
115 m_statsHasBeenSet = true;
116 m_stats.emplace(std::forward<StatsKeyT>(key), std::forward<StatsValueT>(value));
117 return *this;
118 }
120
122
123 inline const Aws::String& GetRequestId() const { return m_requestId; }
124 template <typename RequestIdT = Aws::String>
125 void SetRequestId(RequestIdT&& value) {
126 m_requestIdHasBeenSet = true;
127 m_requestId = std::forward<RequestIdT>(value);
128 }
129 template <typename RequestIdT = Aws::String>
130 SearchResult& WithRequestId(RequestIdT&& value) {
131 SetRequestId(std::forward<RequestIdT>(value));
132 return *this;
133 }
135 private:
136 SearchStatus m_status;
137
138 Hits m_hits;
139
141
143
144 Aws::String m_requestId;
145 bool m_statusHasBeenSet = false;
146 bool m_hitsHasBeenSet = false;
147 bool m_facetsHasBeenSet = false;
148 bool m_statsHasBeenSet = false;
149 bool m_requestIdHasBeenSet = false;
150};
151
152} // namespace Model
153} // namespace CloudSearchDomain
154} // 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)
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