AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
GetRecommendationsRequest.h
1
6#pragma once
7#include <aws/personalize-runtime/PersonalizeRuntime_EXPORTS.h>
8#include <aws/personalize-runtime/PersonalizeRuntimeRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/personalize-runtime/model/Promotion.h>
13#include <utility>
14
15namespace Aws
16{
17namespace PersonalizeRuntime
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_PERSONALIZERUNTIME_API GetRecommendationsRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "GetRecommendations"; }
34
35 AWS_PERSONALIZERUNTIME_API Aws::String SerializePayload() const override;
36
37
39
43 inline const Aws::String& GetCampaignArn() const { return m_campaignArn; }
44 inline bool CampaignArnHasBeenSet() const { return m_campaignArnHasBeenSet; }
45 template<typename CampaignArnT = Aws::String>
46 void SetCampaignArn(CampaignArnT&& value) { m_campaignArnHasBeenSet = true; m_campaignArn = std::forward<CampaignArnT>(value); }
47 template<typename CampaignArnT = Aws::String>
48 GetRecommendationsRequest& WithCampaignArn(CampaignArnT&& value) { SetCampaignArn(std::forward<CampaignArnT>(value)); return *this;}
50
52
56 inline const Aws::String& GetItemId() const { return m_itemId; }
57 inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; }
58 template<typename ItemIdT = Aws::String>
59 void SetItemId(ItemIdT&& value) { m_itemIdHasBeenSet = true; m_itemId = std::forward<ItemIdT>(value); }
60 template<typename ItemIdT = Aws::String>
61 GetRecommendationsRequest& WithItemId(ItemIdT&& value) { SetItemId(std::forward<ItemIdT>(value)); return *this;}
63
65
69 inline const Aws::String& GetUserId() const { return m_userId; }
70 inline bool UserIdHasBeenSet() const { return m_userIdHasBeenSet; }
71 template<typename UserIdT = Aws::String>
72 void SetUserId(UserIdT&& value) { m_userIdHasBeenSet = true; m_userId = std::forward<UserIdT>(value); }
73 template<typename UserIdT = Aws::String>
74 GetRecommendationsRequest& WithUserId(UserIdT&& value) { SetUserId(std::forward<UserIdT>(value)); return *this;}
76
78
83 inline int GetNumResults() const { return m_numResults; }
84 inline bool NumResultsHasBeenSet() const { return m_numResultsHasBeenSet; }
85 inline void SetNumResults(int value) { m_numResultsHasBeenSet = true; m_numResults = value; }
86 inline GetRecommendationsRequest& WithNumResults(int value) { SetNumResults(value); return *this;}
88
90
96 inline const Aws::Map<Aws::String, Aws::String>& GetContext() const { return m_context; }
97 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
98 template<typename ContextT = Aws::Map<Aws::String, Aws::String>>
99 void SetContext(ContextT&& value) { m_contextHasBeenSet = true; m_context = std::forward<ContextT>(value); }
100 template<typename ContextT = Aws::Map<Aws::String, Aws::String>>
101 GetRecommendationsRequest& WithContext(ContextT&& value) { SetContext(std::forward<ContextT>(value)); return *this;}
102 template<typename ContextKeyT = Aws::String, typename ContextValueT = Aws::String>
103 GetRecommendationsRequest& AddContext(ContextKeyT&& key, ContextValueT&& value) {
104 m_contextHasBeenSet = true; m_context.emplace(std::forward<ContextKeyT>(key), std::forward<ContextValueT>(value)); return *this;
105 }
107
109
116 inline const Aws::String& GetFilterArn() const { return m_filterArn; }
117 inline bool FilterArnHasBeenSet() const { return m_filterArnHasBeenSet; }
118 template<typename FilterArnT = Aws::String>
119 void SetFilterArn(FilterArnT&& value) { m_filterArnHasBeenSet = true; m_filterArn = std::forward<FilterArnT>(value); }
120 template<typename FilterArnT = Aws::String>
121 GetRecommendationsRequest& WithFilterArn(FilterArnT&& value) { SetFilterArn(std::forward<FilterArnT>(value)); return *this;}
123
125
139 inline const Aws::Map<Aws::String, Aws::String>& GetFilterValues() const { return m_filterValues; }
140 inline bool FilterValuesHasBeenSet() const { return m_filterValuesHasBeenSet; }
141 template<typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
142 void SetFilterValues(FilterValuesT&& value) { m_filterValuesHasBeenSet = true; m_filterValues = std::forward<FilterValuesT>(value); }
143 template<typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
144 GetRecommendationsRequest& WithFilterValues(FilterValuesT&& value) { SetFilterValues(std::forward<FilterValuesT>(value)); return *this;}
145 template<typename FilterValuesKeyT = Aws::String, typename FilterValuesValueT = Aws::String>
146 GetRecommendationsRequest& AddFilterValues(FilterValuesKeyT&& key, FilterValuesValueT&& value) {
147 m_filterValuesHasBeenSet = true; m_filterValues.emplace(std::forward<FilterValuesKeyT>(key), std::forward<FilterValuesValueT>(value)); return *this;
148 }
150
152
157 inline const Aws::String& GetRecommenderArn() const { return m_recommenderArn; }
158 inline bool RecommenderArnHasBeenSet() const { return m_recommenderArnHasBeenSet; }
159 template<typename RecommenderArnT = Aws::String>
160 void SetRecommenderArn(RecommenderArnT&& value) { m_recommenderArnHasBeenSet = true; m_recommenderArn = std::forward<RecommenderArnT>(value); }
161 template<typename RecommenderArnT = Aws::String>
162 GetRecommendationsRequest& WithRecommenderArn(RecommenderArnT&& value) { SetRecommenderArn(std::forward<RecommenderArnT>(value)); return *this;}
164
166
171 inline const Aws::Vector<Promotion>& GetPromotions() const { return m_promotions; }
172 inline bool PromotionsHasBeenSet() const { return m_promotionsHasBeenSet; }
173 template<typename PromotionsT = Aws::Vector<Promotion>>
174 void SetPromotions(PromotionsT&& value) { m_promotionsHasBeenSet = true; m_promotions = std::forward<PromotionsT>(value); }
175 template<typename PromotionsT = Aws::Vector<Promotion>>
176 GetRecommendationsRequest& WithPromotions(PromotionsT&& value) { SetPromotions(std::forward<PromotionsT>(value)); return *this;}
177 template<typename PromotionsT = Promotion>
178 GetRecommendationsRequest& AddPromotions(PromotionsT&& value) { m_promotionsHasBeenSet = true; m_promotions.emplace_back(std::forward<PromotionsT>(value)); return *this; }
180
182
195 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetMetadataColumns() const { return m_metadataColumns; }
196 inline bool MetadataColumnsHasBeenSet() const { return m_metadataColumnsHasBeenSet; }
197 template<typename MetadataColumnsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
198 void SetMetadataColumns(MetadataColumnsT&& value) { m_metadataColumnsHasBeenSet = true; m_metadataColumns = std::forward<MetadataColumnsT>(value); }
199 template<typename MetadataColumnsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
200 GetRecommendationsRequest& WithMetadataColumns(MetadataColumnsT&& value) { SetMetadataColumns(std::forward<MetadataColumnsT>(value)); return *this;}
201 template<typename MetadataColumnsKeyT = Aws::String, typename MetadataColumnsValueT = Aws::Vector<Aws::String>>
202 GetRecommendationsRequest& AddMetadataColumns(MetadataColumnsKeyT&& key, MetadataColumnsValueT&& value) {
203 m_metadataColumnsHasBeenSet = true; m_metadataColumns.emplace(std::forward<MetadataColumnsKeyT>(key), std::forward<MetadataColumnsValueT>(value)); return *this;
204 }
206 private:
207
208 Aws::String m_campaignArn;
209 bool m_campaignArnHasBeenSet = false;
210
211 Aws::String m_itemId;
212 bool m_itemIdHasBeenSet = false;
213
214 Aws::String m_userId;
215 bool m_userIdHasBeenSet = false;
216
217 int m_numResults{0};
218 bool m_numResultsHasBeenSet = false;
219
221 bool m_contextHasBeenSet = false;
222
223 Aws::String m_filterArn;
224 bool m_filterArnHasBeenSet = false;
225
227 bool m_filterValuesHasBeenSet = false;
228
229 Aws::String m_recommenderArn;
230 bool m_recommenderArnHasBeenSet = false;
231
232 Aws::Vector<Promotion> m_promotions;
233 bool m_promotionsHasBeenSet = false;
234
236 bool m_metadataColumnsHasBeenSet = false;
237 };
238
239} // namespace Model
240} // namespace PersonalizeRuntime
241} // 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