AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
SuggestModel.h
1
6#pragma once
7#include <aws/cloudsearchdomain/CloudSearchDomain_EXPORTS.h>
8#include <aws/cloudsearchdomain/model/SuggestionMatch.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace CloudSearchDomain {
22namespace Model {
23
31 public:
32 AWS_CLOUDSEARCHDOMAIN_API SuggestModel() = default;
33 AWS_CLOUDSEARCHDOMAIN_API SuggestModel(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CLOUDSEARCHDOMAIN_API SuggestModel& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CLOUDSEARCHDOMAIN_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetQuery() const { return m_query; }
42 inline bool QueryHasBeenSet() const { return m_queryHasBeenSet; }
43 template <typename QueryT = Aws::String>
44 void SetQuery(QueryT&& value) {
45 m_queryHasBeenSet = true;
46 m_query = std::forward<QueryT>(value);
47 }
48 template <typename QueryT = Aws::String>
49 SuggestModel& WithQuery(QueryT&& value) {
50 SetQuery(std::forward<QueryT>(value));
51 return *this;
52 }
54
56
59 inline long long GetFound() const { return m_found; }
60 inline bool FoundHasBeenSet() const { return m_foundHasBeenSet; }
61 inline void SetFound(long long value) {
62 m_foundHasBeenSet = true;
63 m_found = value;
64 }
65 inline SuggestModel& WithFound(long long value) {
66 SetFound(value);
67 return *this;
68 }
70
72
75 inline const Aws::Vector<SuggestionMatch>& GetSuggestions() const { return m_suggestions; }
76 inline bool SuggestionsHasBeenSet() const { return m_suggestionsHasBeenSet; }
77 template <typename SuggestionsT = Aws::Vector<SuggestionMatch>>
78 void SetSuggestions(SuggestionsT&& value) {
79 m_suggestionsHasBeenSet = true;
80 m_suggestions = std::forward<SuggestionsT>(value);
81 }
82 template <typename SuggestionsT = Aws::Vector<SuggestionMatch>>
83 SuggestModel& WithSuggestions(SuggestionsT&& value) {
84 SetSuggestions(std::forward<SuggestionsT>(value));
85 return *this;
86 }
87 template <typename SuggestionsT = SuggestionMatch>
88 SuggestModel& AddSuggestions(SuggestionsT&& value) {
89 m_suggestionsHasBeenSet = true;
90 m_suggestions.emplace_back(std::forward<SuggestionsT>(value));
91 return *this;
92 }
94 private:
95 Aws::String m_query;
96
97 long long m_found{0};
98
99 Aws::Vector<SuggestionMatch> m_suggestions;
100 bool m_queryHasBeenSet = false;
101 bool m_foundHasBeenSet = false;
102 bool m_suggestionsHasBeenSet = false;
103};
104
105} // namespace Model
106} // namespace CloudSearchDomain
107} // namespace Aws
const Aws::Vector< SuggestionMatch > & GetSuggestions() const
SuggestModel & WithSuggestions(SuggestionsT &&value)
AWS_CLOUDSEARCHDOMAIN_API Aws::Utils::Json::JsonValue Jsonize() const
SuggestModel & WithQuery(QueryT &&value)
SuggestModel & WithFound(long long value)
void SetSuggestions(SuggestionsT &&value)
SuggestModel & AddSuggestions(SuggestionsT &&value)
AWS_CLOUDSEARCHDOMAIN_API SuggestModel & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetQuery() const
AWS_CLOUDSEARCHDOMAIN_API SuggestModel()=default
AWS_CLOUDSEARCHDOMAIN_API SuggestModel(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue