AWS SDK for C++

AWS SDK for C++ Version 1.11.894

Loading...
Searching...
No Matches
SearchRecommendationsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/customer-profiles/CustomerProfilesRequest.h>
11#include <aws/customer-profiles/CustomerProfiles_EXPORTS.h>
12#include <aws/customer-profiles/model/RecommendationDiversityConfig.h>
13#include <aws/customer-profiles/model/RecommendationMetadata.h>
14#include <aws/customer-profiles/model/Recommender.h>
15
16#include <utility>
17
18namespace Aws {
19namespace CustomerProfiles {
20namespace Model {
21
25 public:
26 AWS_CUSTOMERPROFILES_API SearchRecommendationsRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "SearchRecommendations"; }
33
34 AWS_CUSTOMERPROFILES_API Aws::String SerializePayload() const override;
35
37
40 inline const Aws::String& GetDomainName() const { return m_domainName; }
41 inline bool DomainNameHasBeenSet() const { return m_domainNameHasBeenSet; }
42 template <typename DomainNameT = Aws::String>
43 void SetDomainName(DomainNameT&& value) {
44 m_domainNameHasBeenSet = true;
45 m_domainName = std::forward<DomainNameT>(value);
46 }
47 template <typename DomainNameT = Aws::String>
49 SetDomainName(std::forward<DomainNameT>(value));
50 return *this;
51 }
53
55
60 inline const Aws::String& GetKeyName() const { return m_keyName; }
61 inline bool KeyNameHasBeenSet() const { return m_keyNameHasBeenSet; }
62 template <typename KeyNameT = Aws::String>
63 void SetKeyName(KeyNameT&& value) {
64 m_keyNameHasBeenSet = true;
65 m_keyName = std::forward<KeyNameT>(value);
66 }
67 template <typename KeyNameT = Aws::String>
69 SetKeyName(std::forward<KeyNameT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::Vector<Aws::String>& GetKeyValues() const { return m_keyValues; }
79 inline bool KeyValuesHasBeenSet() const { return m_keyValuesHasBeenSet; }
80 template <typename KeyValuesT = Aws::Vector<Aws::String>>
81 void SetKeyValues(KeyValuesT&& value) {
82 m_keyValuesHasBeenSet = true;
83 m_keyValues = std::forward<KeyValuesT>(value);
84 }
85 template <typename KeyValuesT = Aws::Vector<Aws::String>>
87 SetKeyValues(std::forward<KeyValuesT>(value));
88 return *this;
89 }
90 template <typename KeyValuesT = Aws::String>
92 m_keyValuesHasBeenSet = true;
93 m_keyValues.emplace_back(std::forward<KeyValuesT>(value));
94 return *this;
95 }
97
99
102 inline const Recommender& GetRecommender() const { return m_recommender; }
103 inline bool RecommenderHasBeenSet() const { return m_recommenderHasBeenSet; }
104 template <typename RecommenderT = Recommender>
105 void SetRecommender(RecommenderT&& value) {
106 m_recommenderHasBeenSet = true;
107 m_recommender = std::forward<RecommenderT>(value);
108 }
109 template <typename RecommenderT = Recommender>
111 SetRecommender(std::forward<RecommenderT>(value));
112 return *this;
113 }
115
117
122 inline const Aws::Vector<Aws::String>& GetCandidateIds() const { return m_candidateIds; }
123 inline bool CandidateIdsHasBeenSet() const { return m_candidateIdsHasBeenSet; }
124 template <typename CandidateIdsT = Aws::Vector<Aws::String>>
125 void SetCandidateIds(CandidateIdsT&& value) {
126 m_candidateIdsHasBeenSet = true;
127 m_candidateIds = std::forward<CandidateIdsT>(value);
128 }
129 template <typename CandidateIdsT = Aws::Vector<Aws::String>>
131 SetCandidateIds(std::forward<CandidateIdsT>(value));
132 return *this;
133 }
134 template <typename CandidateIdsT = Aws::String>
136 m_candidateIdsHasBeenSet = true;
137 m_candidateIds.emplace_back(std::forward<CandidateIdsT>(value));
138 return *this;
139 }
141
143
147 inline const Aws::Map<Aws::String, Aws::String>& GetContext() const { return m_context; }
148 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
149 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
150 void SetContext(ContextT&& value) {
151 m_contextHasBeenSet = true;
152 m_context = std::forward<ContextT>(value);
153 }
154 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
156 SetContext(std::forward<ContextT>(value));
157 return *this;
158 }
159 template <typename ContextKeyT = Aws::String, typename ContextValueT = Aws::String>
160 SearchRecommendationsRequest& AddContext(ContextKeyT&& key, ContextValueT&& value) {
161 m_contextHasBeenSet = true;
162 m_context.emplace(std::forward<ContextKeyT>(key), std::forward<ContextValueT>(value));
163 return *this;
164 }
166
168
173 inline const RecommendationDiversityConfig& GetDiversity() const { return m_diversity; }
174 inline bool DiversityHasBeenSet() const { return m_diversityHasBeenSet; }
175 template <typename DiversityT = RecommendationDiversityConfig>
176 void SetDiversity(DiversityT&& value) {
177 m_diversityHasBeenSet = true;
178 m_diversity = std::forward<DiversityT>(value);
179 }
180 template <typename DiversityT = RecommendationDiversityConfig>
182 SetDiversity(std::forward<DiversityT>(value));
183 return *this;
184 }
186
188
191 inline const RecommendationMetadata& GetMetadata() const { return m_metadata; }
192 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
193 template <typename MetadataT = RecommendationMetadata>
194 void SetMetadata(MetadataT&& value) {
195 m_metadataHasBeenSet = true;
196 m_metadata = std::forward<MetadataT>(value);
197 }
198 template <typename MetadataT = RecommendationMetadata>
200 SetMetadata(std::forward<MetadataT>(value));
201 return *this;
202 }
204
206
209 inline int GetMaxRecommendations() const { return m_maxRecommendations; }
210 inline bool MaxRecommendationsHasBeenSet() const { return m_maxRecommendationsHasBeenSet; }
211 inline void SetMaxRecommendations(int value) {
212 m_maxRecommendationsHasBeenSet = true;
213 m_maxRecommendations = value;
214 }
217 return *this;
218 }
220 private:
221 Aws::String m_domainName;
222
223 Aws::String m_keyName;
224
225 Aws::Vector<Aws::String> m_keyValues;
226
227 Recommender m_recommender;
228
229 Aws::Vector<Aws::String> m_candidateIds;
230
232
234
235 RecommendationMetadata m_metadata;
236
237 int m_maxRecommendations{0};
238 bool m_domainNameHasBeenSet = false;
239 bool m_keyNameHasBeenSet = false;
240 bool m_keyValuesHasBeenSet = false;
241 bool m_recommenderHasBeenSet = false;
242 bool m_candidateIdsHasBeenSet = false;
243 bool m_contextHasBeenSet = false;
244 bool m_diversityHasBeenSet = false;
245 bool m_metadataHasBeenSet = false;
246 bool m_maxRecommendationsHasBeenSet = false;
247};
248
249} // namespace Model
250} // namespace CustomerProfiles
251} // namespace Aws
SearchRecommendationsRequest & WithDiversity(DiversityT &&value)
AWS_CUSTOMERPROFILES_API SearchRecommendationsRequest()=default
SearchRecommendationsRequest & WithDomainName(DomainNameT &&value)
SearchRecommendationsRequest & AddKeyValues(KeyValuesT &&value)
SearchRecommendationsRequest & WithKeyName(KeyNameT &&value)
SearchRecommendationsRequest & WithContext(ContextT &&value)
SearchRecommendationsRequest & WithMetadata(MetadataT &&value)
AWS_CUSTOMERPROFILES_API Aws::String SerializePayload() const override
SearchRecommendationsRequest & WithRecommender(RecommenderT &&value)
SearchRecommendationsRequest & WithKeyValues(KeyValuesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetContext() const
SearchRecommendationsRequest & AddContext(ContextKeyT &&key, ContextValueT &&value)
SearchRecommendationsRequest & AddCandidateIds(CandidateIdsT &&value)
SearchRecommendationsRequest & WithCandidateIds(CandidateIdsT &&value)
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
std::vector< T, Aws::Allocator< T > > Vector