AWS SDK for C++  0.12.9
AWS SDK for C++
SuggestModel.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
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace CloudSearchDomain
31 {
32 namespace Model
33 {
34 
40  {
41  public:
42  SuggestModel();
43  SuggestModel(const Aws::Utils::Json::JsonValue& jsonValue);
44  SuggestModel& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
45  Aws::Utils::Json::JsonValue Jsonize() const;
46 
50  inline const Aws::String& GetQuery() const{ return m_query; }
51 
55  inline void SetQuery(const Aws::String& value) { m_queryHasBeenSet = true; m_query = value; }
56 
60  inline void SetQuery(Aws::String&& value) { m_queryHasBeenSet = true; m_query = value; }
61 
65  inline void SetQuery(const char* value) { m_queryHasBeenSet = true; m_query.assign(value); }
66 
70  inline SuggestModel& WithQuery(const Aws::String& value) { SetQuery(value); return *this;}
71 
75  inline SuggestModel& WithQuery(Aws::String&& value) { SetQuery(value); return *this;}
76 
80  inline SuggestModel& WithQuery(const char* value) { SetQuery(value); return *this;}
81 
85  inline long long GetFound() const{ return m_found; }
86 
90  inline void SetFound(long long value) { m_foundHasBeenSet = true; m_found = value; }
91 
95  inline SuggestModel& WithFound(long long value) { SetFound(value); return *this;}
96 
100  inline const Aws::Vector<SuggestionMatch>& GetSuggestions() const{ return m_suggestions; }
101 
105  inline void SetSuggestions(const Aws::Vector<SuggestionMatch>& value) { m_suggestionsHasBeenSet = true; m_suggestions = value; }
106 
110  inline void SetSuggestions(Aws::Vector<SuggestionMatch>&& value) { m_suggestionsHasBeenSet = true; m_suggestions = value; }
111 
115  inline SuggestModel& WithSuggestions(const Aws::Vector<SuggestionMatch>& value) { SetSuggestions(value); return *this;}
116 
120  inline SuggestModel& WithSuggestions(Aws::Vector<SuggestionMatch>&& value) { SetSuggestions(value); return *this;}
121 
125  inline SuggestModel& AddSuggestions(const SuggestionMatch& value) { m_suggestionsHasBeenSet = true; m_suggestions.push_back(value); return *this; }
126 
130  inline SuggestModel& AddSuggestions(SuggestionMatch&& value) { m_suggestionsHasBeenSet = true; m_suggestions.push_back(value); return *this; }
131 
132  private:
133  Aws::String m_query;
134  bool m_queryHasBeenSet;
135  long long m_found;
136  bool m_foundHasBeenSet;
137  Aws::Vector<SuggestionMatch> m_suggestions;
138  bool m_suggestionsHasBeenSet;
139  };
140 
141 } // namespace Model
142 } // namespace CloudSearchDomain
143 } // namespace Aws
SuggestModel & WithSuggestions(Aws::Vector< SuggestionMatch > &&value)
Definition: SuggestModel.h:120
const Aws::Vector< SuggestionMatch > & GetSuggestions() const
Definition: SuggestModel.h:100
void SetSuggestions(Aws::Vector< SuggestionMatch > &&value)
Definition: SuggestModel.h:110
void SetSuggestions(const Aws::Vector< SuggestionMatch > &value)
Definition: SuggestModel.h:105
SuggestModel & WithQuery(Aws::String &&value)
Definition: SuggestModel.h:75
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetQuery(const Aws::String &value)
Definition: SuggestModel.h:55
SuggestModel & WithSuggestions(const Aws::Vector< SuggestionMatch > &value)
Definition: SuggestModel.h:115
#define AWS_CLOUDSEARCHDOMAIN_API
const Aws::String & GetQuery() const
Definition: SuggestModel.h:50
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
SuggestModel & WithQuery(const char *value)
Definition: SuggestModel.h:80
SuggestModel & AddSuggestions(const SuggestionMatch &value)
Definition: SuggestModel.h:125
SuggestModel & WithFound(long long value)
Definition: SuggestModel.h:95
SuggestModel & AddSuggestions(SuggestionMatch &&value)
Definition: SuggestModel.h:130
SuggestModel & WithQuery(const Aws::String &value)
Definition: SuggestModel.h:70
JSON (JavaScript Object Notation).