AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
GetRecommendationsRequest.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/personalize-runtime/PersonalizeRuntimeRequest.h>
11#include <aws/personalize-runtime/PersonalizeRuntime_EXPORTS.h>
12#include <aws/personalize-runtime/model/Promotion.h>
13
14#include <utility>
15
16namespace Aws {
17namespace PersonalizeRuntime {
18namespace Model {
19
23 public:
24 AWS_PERSONALIZERUNTIME_API GetRecommendationsRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "GetRecommendations"; }
31
32 AWS_PERSONALIZERUNTIME_API Aws::String SerializePayload() const override;
33
35
39 inline const Aws::String& GetCampaignArn() const { return m_campaignArn; }
40 inline bool CampaignArnHasBeenSet() const { return m_campaignArnHasBeenSet; }
41 template <typename CampaignArnT = Aws::String>
42 void SetCampaignArn(CampaignArnT&& value) {
43 m_campaignArnHasBeenSet = true;
44 m_campaignArn = std::forward<CampaignArnT>(value);
45 }
46 template <typename CampaignArnT = Aws::String>
48 SetCampaignArn(std::forward<CampaignArnT>(value));
49 return *this;
50 }
52
54
58 inline const Aws::String& GetItemId() const { return m_itemId; }
59 inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; }
60 template <typename ItemIdT = Aws::String>
61 void SetItemId(ItemIdT&& value) {
62 m_itemIdHasBeenSet = true;
63 m_itemId = std::forward<ItemIdT>(value);
64 }
65 template <typename ItemIdT = Aws::String>
67 SetItemId(std::forward<ItemIdT>(value));
68 return *this;
69 }
71
73
77 inline const Aws::String& GetUserId() const { return m_userId; }
78 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
79 template <typename UserIdT = Aws::String>
80 void SetUserId(UserIdT&& value) {
81 m_userIdHasBeenSet = true;
82 m_userId = std::forward<UserIdT>(value);
83 }
84 template <typename UserIdT = Aws::String>
86 SetUserId(std::forward<UserIdT>(value));
87 return *this;
88 }
90
92
97 inline int GetNumResults() const { return m_numResults; }
98 inline bool NumResultsHasBeenSet() const { return m_numResultsHasBeenSet; }
99 inline void SetNumResults(int value) {
100 m_numResultsHasBeenSet = true;
101 m_numResults = value;
102 }
104 SetNumResults(value);
105 return *this;
106 }
108
110
116 inline const Aws::Map<Aws::String, Aws::String>& GetContext() const { return m_context; }
117 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
118 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
119 void SetContext(ContextT&& value) {
120 m_contextHasBeenSet = true;
121 m_context = std::forward<ContextT>(value);
122 }
123 template <typename ContextT = Aws::Map<Aws::String, Aws::String>>
125 SetContext(std::forward<ContextT>(value));
126 return *this;
127 }
128 template <typename ContextKeyT = Aws::String, typename ContextValueT = Aws::String>
129 GetRecommendationsRequest& AddContext(ContextKeyT&& key, ContextValueT&& value) {
130 m_contextHasBeenSet = true;
131 m_context.emplace(std::forward<ContextKeyT>(key), std::forward<ContextValueT>(value));
132 return *this;
133 }
135
137
144 inline const Aws::String& GetFilterArn() const { return m_filterArn; }
145 inline bool FilterArnHasBeenSet() const { return m_filterArnHasBeenSet; }
146 template <typename FilterArnT = Aws::String>
147 void SetFilterArn(FilterArnT&& value) {
148 m_filterArnHasBeenSet = true;
149 m_filterArn = std::forward<FilterArnT>(value);
150 }
151 template <typename FilterArnT = Aws::String>
153 SetFilterArn(std::forward<FilterArnT>(value));
154 return *this;
155 }
157
159
173 inline const Aws::Map<Aws::String, Aws::String>& GetFilterValues() const { return m_filterValues; }
174 inline bool FilterValuesHasBeenSet() const { return m_filterValuesHasBeenSet; }
175 template <typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
176 void SetFilterValues(FilterValuesT&& value) {
177 m_filterValuesHasBeenSet = true;
178 m_filterValues = std::forward<FilterValuesT>(value);
179 }
180 template <typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
182 SetFilterValues(std::forward<FilterValuesT>(value));
183 return *this;
184 }
185 template <typename FilterValuesKeyT = Aws::String, typename FilterValuesValueT = Aws::String>
186 GetRecommendationsRequest& AddFilterValues(FilterValuesKeyT&& key, FilterValuesValueT&& value) {
187 m_filterValuesHasBeenSet = true;
188 m_filterValues.emplace(std::forward<FilterValuesKeyT>(key), std::forward<FilterValuesValueT>(value));
189 return *this;
190 }
192
194
199 inline const Aws::String& GetRecommenderArn() const { return m_recommenderArn; }
200 inline bool RecommenderArnHasBeenSet() const { return m_recommenderArnHasBeenSet; }
201 template <typename RecommenderArnT = Aws::String>
202 void SetRecommenderArn(RecommenderArnT&& value) {
203 m_recommenderArnHasBeenSet = true;
204 m_recommenderArn = std::forward<RecommenderArnT>(value);
205 }
206 template <typename RecommenderArnT = Aws::String>
208 SetRecommenderArn(std::forward<RecommenderArnT>(value));
209 return *this;
210 }
212
214
219 inline const Aws::Vector<Promotion>& GetPromotions() const { return m_promotions; }
220 inline bool PromotionsHasBeenSet() const { return m_promotionsHasBeenSet; }
221 template <typename PromotionsT = Aws::Vector<Promotion>>
222 void SetPromotions(PromotionsT&& value) {
223 m_promotionsHasBeenSet = true;
224 m_promotions = std::forward<PromotionsT>(value);
225 }
226 template <typename PromotionsT = Aws::Vector<Promotion>>
228 SetPromotions(std::forward<PromotionsT>(value));
229 return *this;
230 }
231 template <typename PromotionsT = Promotion>
233 m_promotionsHasBeenSet = true;
234 m_promotions.emplace_back(std::forward<PromotionsT>(value));
235 return *this;
236 }
238
240
253 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetMetadataColumns() const { return m_metadataColumns; }
254 inline bool MetadataColumnsHasBeenSet() const { return m_metadataColumnsHasBeenSet; }
255 template <typename MetadataColumnsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
256 void SetMetadataColumns(MetadataColumnsT&& value) {
257 m_metadataColumnsHasBeenSet = true;
258 m_metadataColumns = std::forward<MetadataColumnsT>(value);
259 }
260 template <typename MetadataColumnsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
262 SetMetadataColumns(std::forward<MetadataColumnsT>(value));
263 return *this;
264 }
265 template <typename MetadataColumnsKeyT = Aws::String, typename MetadataColumnsValueT = Aws::Vector<Aws::String>>
266 GetRecommendationsRequest& AddMetadataColumns(MetadataColumnsKeyT&& key, MetadataColumnsValueT&& value) {
267 m_metadataColumnsHasBeenSet = true;
268 m_metadataColumns.emplace(std::forward<MetadataColumnsKeyT>(key), std::forward<MetadataColumnsValueT>(value));
269 return *this;
270 }
272 private:
273 Aws::String m_campaignArn;
274
275 Aws::String m_itemId;
276
277 Aws::String m_userId;
278
279 int m_numResults{0};
280
282
283 Aws::String m_filterArn;
284
286
287 Aws::String m_recommenderArn;
288
289 Aws::Vector<Promotion> m_promotions;
290
292 bool m_campaignArnHasBeenSet = false;
293 bool m_itemIdHasBeenSet = false;
294 bool m_userIdHasBeenSet = false;
295 bool m_numResultsHasBeenSet = false;
296 bool m_contextHasBeenSet = false;
297 bool m_filterArnHasBeenSet = false;
298 bool m_filterValuesHasBeenSet = false;
299 bool m_recommenderArnHasBeenSet = false;
300 bool m_promotionsHasBeenSet = false;
301 bool m_metadataColumnsHasBeenSet = false;
302};
303
304} // namespace Model
305} // namespace PersonalizeRuntime
306} // namespace Aws
GetRecommendationsRequest & WithPromotions(PromotionsT &&value)
GetRecommendationsRequest & AddFilterValues(FilterValuesKeyT &&key, FilterValuesValueT &&value)
GetRecommendationsRequest & WithItemId(ItemIdT &&value)
GetRecommendationsRequest & WithCampaignArn(CampaignArnT &&value)
GetRecommendationsRequest & WithUserId(UserIdT &&value)
AWS_PERSONALIZERUNTIME_API Aws::String SerializePayload() const override
GetRecommendationsRequest & WithFilterValues(FilterValuesT &&value)
GetRecommendationsRequest & AddMetadataColumns(MetadataColumnsKeyT &&key, MetadataColumnsValueT &&value)
const Aws::Map< Aws::String, Aws::String > & GetContext() const
GetRecommendationsRequest & AddPromotions(PromotionsT &&value)
GetRecommendationsRequest & WithRecommenderArn(RecommenderArnT &&value)
GetRecommendationsRequest & AddContext(ContextKeyT &&key, ContextValueT &&value)
AWS_PERSONALIZERUNTIME_API GetRecommendationsRequest()=default
GetRecommendationsRequest & WithFilterArn(FilterArnT &&value)
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetMetadataColumns() const
const Aws::Map< Aws::String, Aws::String > & GetFilterValues() const
GetRecommendationsRequest & WithMetadataColumns(MetadataColumnsT &&value)
GetRecommendationsRequest & WithContext(ContextT &&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