AWS SDK for C++  0.14.3
AWS SDK for C++
SearchResult.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
23 
24 namespace Aws
25 {
26 template<typename RESULT_TYPE>
27 class AmazonWebServiceResult;
28 
29 namespace Utils
30 {
31 namespace Json
32 {
33  class JsonValue;
34 } // namespace Json
35 } // namespace Utils
36 namespace CloudSearchDomain
37 {
38 namespace Model
39 {
46  {
47  public:
48  SearchResult();
51 
55  inline const SearchStatus& GetStatus() const{ return m_status; }
56 
60  inline void SetStatus(const SearchStatus& value) { m_status = value; }
61 
65  inline void SetStatus(SearchStatus&& value) { m_status = value; }
66 
70  inline SearchResult& WithStatus(const SearchStatus& value) { SetStatus(value); return *this;}
71 
75  inline SearchResult& WithStatus(SearchStatus&& value) { SetStatus(value); return *this;}
76 
80  inline const Hits& GetHits() const{ return m_hits; }
81 
85  inline void SetHits(const Hits& value) { m_hits = value; }
86 
90  inline void SetHits(Hits&& value) { m_hits = value; }
91 
95  inline SearchResult& WithHits(const Hits& value) { SetHits(value); return *this;}
96 
100  inline SearchResult& WithHits(Hits&& value) { SetHits(value); return *this;}
101 
105  inline const Aws::Map<Aws::String, BucketInfo>& GetFacets() const{ return m_facets; }
106 
110  inline void SetFacets(const Aws::Map<Aws::String, BucketInfo>& value) { m_facets = value; }
111 
115  inline void SetFacets(Aws::Map<Aws::String, BucketInfo>&& value) { m_facets = value; }
116 
120  inline SearchResult& WithFacets(const Aws::Map<Aws::String, BucketInfo>& value) { SetFacets(value); return *this;}
121 
125  inline SearchResult& WithFacets(Aws::Map<Aws::String, BucketInfo>&& value) { SetFacets(value); return *this;}
126 
130  inline SearchResult& AddFacets(const Aws::String& key, const BucketInfo& value) { m_facets[key] = value; return *this; }
131 
135  inline SearchResult& AddFacets(Aws::String&& key, const BucketInfo& value) { m_facets[key] = value; return *this; }
136 
140  inline SearchResult& AddFacets(const Aws::String& key, BucketInfo&& value) { m_facets[key] = value; return *this; }
141 
145  inline SearchResult& AddFacets(Aws::String&& key, BucketInfo&& value) { m_facets[key] = value; return *this; }
146 
150  inline SearchResult& AddFacets(const char* key, BucketInfo&& value) { m_facets[key] = value; return *this; }
151 
155  inline SearchResult& AddFacets(const char* key, const BucketInfo& value) { m_facets[key] = value; return *this; }
156 
160  inline const Aws::Map<Aws::String, FieldStats>& GetStats() const{ return m_stats; }
161 
165  inline void SetStats(const Aws::Map<Aws::String, FieldStats>& value) { m_stats = value; }
166 
170  inline void SetStats(Aws::Map<Aws::String, FieldStats>&& value) { m_stats = value; }
171 
175  inline SearchResult& WithStats(const Aws::Map<Aws::String, FieldStats>& value) { SetStats(value); return *this;}
176 
180  inline SearchResult& WithStats(Aws::Map<Aws::String, FieldStats>&& value) { SetStats(value); return *this;}
181 
185  inline SearchResult& AddStats(const Aws::String& key, const FieldStats& value) { m_stats[key] = value; return *this; }
186 
190  inline SearchResult& AddStats(Aws::String&& key, const FieldStats& value) { m_stats[key] = value; return *this; }
191 
195  inline SearchResult& AddStats(const Aws::String& key, FieldStats&& value) { m_stats[key] = value; return *this; }
196 
200  inline SearchResult& AddStats(Aws::String&& key, FieldStats&& value) { m_stats[key] = value; return *this; }
201 
205  inline SearchResult& AddStats(const char* key, FieldStats&& value) { m_stats[key] = value; return *this; }
206 
210  inline SearchResult& AddStats(const char* key, const FieldStats& value) { m_stats[key] = value; return *this; }
211 
212  private:
213  SearchStatus m_status;
214  Hits m_hits;
217  };
218 
219 } // namespace Model
220 } // namespace CloudSearchDomain
221 } // namespace Aws
SearchResult & AddFacets(Aws::String &&key, BucketInfo &&value)
Definition: SearchResult.h:145
SearchResult & AddStats(const char *key, const FieldStats &value)
Definition: SearchResult.h:210
SearchResult & WithFacets(const Aws::Map< Aws::String, BucketInfo > &value)
Definition: SearchResult.h:120
const Aws::Map< Aws::String, FieldStats > & GetStats() const
Definition: SearchResult.h:160
SearchResult & WithStatus(const SearchStatus &value)
Definition: SearchResult.h:70
SearchResult & WithStats(const Aws::Map< Aws::String, FieldStats > &value)
Definition: SearchResult.h:175
const SearchStatus & GetStatus() const
Definition: SearchResult.h:55
const Aws::Map< Aws::String, BucketInfo > & GetFacets() const
Definition: SearchResult.h:105
SearchResult & AddFacets(const char *key, BucketInfo &&value)
Definition: SearchResult.h:150
SearchResult & AddStats(const Aws::String &key, const FieldStats &value)
Definition: SearchResult.h:185
SearchResult & WithHits(Hits &&value)
Definition: SearchResult.h:100
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
SearchResult & WithStatus(SearchStatus &&value)
Definition: SearchResult.h:75
SearchResult & AddStats(const char *key, FieldStats &&value)
Definition: SearchResult.h:205
SearchResult & WithHits(const Hits &value)
Definition: SearchResult.h:95
SearchResult & AddFacets(const Aws::String &key, const BucketInfo &value)
Definition: SearchResult.h:130
SearchResult & WithStats(Aws::Map< Aws::String, FieldStats > &&value)
Definition: SearchResult.h:180
SearchResult & WithFacets(Aws::Map< Aws::String, BucketInfo > &&value)
Definition: SearchResult.h:125
SearchResult & AddFacets(Aws::String &&key, const BucketInfo &value)
Definition: SearchResult.h:135
void SetStatus(const SearchStatus &value)
Definition: SearchResult.h:60
SearchResult & AddFacets(const char *key, const BucketInfo &value)
Definition: SearchResult.h:155
SearchResult & AddStats(Aws::String &&key, FieldStats &&value)
Definition: SearchResult.h:200
void SetFacets(Aws::Map< Aws::String, BucketInfo > &&value)
Definition: SearchResult.h:115
SearchResult & AddFacets(const Aws::String &key, BucketInfo &&value)
Definition: SearchResult.h:140
#define AWS_CLOUDSEARCHDOMAIN_API
SearchResult & AddStats(const Aws::String &key, FieldStats &&value)
Definition: SearchResult.h:195
void SetStats(const Aws::Map< Aws::String, FieldStats > &value)
Definition: SearchResult.h:165
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetStats(Aws::Map< Aws::String, FieldStats > &&value)
Definition: SearchResult.h:170
void SetStatus(SearchStatus &&value)
Definition: SearchResult.h:65
void SetFacets(const Aws::Map< Aws::String, BucketInfo > &value)
Definition: SearchResult.h:110
SearchResult & AddStats(Aws::String &&key, const FieldStats &value)
Definition: SearchResult.h:190
JSON (JavaScript Object Notation).