AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
PredictedItem.h
1
6#pragma once
7#include <aws/personalize-runtime/PersonalizeRuntime_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace PersonalizeRuntime
24{
25namespace Model
26{
27
35 {
36 public:
37 AWS_PERSONALIZERUNTIME_API PredictedItem() = default;
38 AWS_PERSONALIZERUNTIME_API PredictedItem(Aws::Utils::Json::JsonView jsonValue);
39 AWS_PERSONALIZERUNTIME_API PredictedItem& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
47 inline const Aws::String& GetItemId() const { return m_itemId; }
48 inline bool ItemIdHasBeenSet() const { return m_itemIdHasBeenSet; }
49 template<typename ItemIdT = Aws::String>
50 void SetItemId(ItemIdT&& value) { m_itemIdHasBeenSet = true; m_itemId = std::forward<ItemIdT>(value); }
51 template<typename ItemIdT = Aws::String>
52 PredictedItem& WithItemId(ItemIdT&& value) { SetItemId(std::forward<ItemIdT>(value)); return *this;}
54
56
61 inline double GetScore() const { return m_score; }
62 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
63 inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; }
64 inline PredictedItem& WithScore(double value) { SetScore(value); return *this;}
66
68
71 inline const Aws::String& GetPromotionName() const { return m_promotionName; }
72 inline bool PromotionNameHasBeenSet() const { return m_promotionNameHasBeenSet; }
73 template<typename PromotionNameT = Aws::String>
74 void SetPromotionName(PromotionNameT&& value) { m_promotionNameHasBeenSet = true; m_promotionName = std::forward<PromotionNameT>(value); }
75 template<typename PromotionNameT = Aws::String>
76 PredictedItem& WithPromotionName(PromotionNameT&& value) { SetPromotionName(std::forward<PromotionNameT>(value)); return *this;}
78
80
83 inline const Aws::Map<Aws::String, Aws::String>& GetMetadata() const { return m_metadata; }
84 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
85 template<typename MetadataT = Aws::Map<Aws::String, Aws::String>>
86 void SetMetadata(MetadataT&& value) { m_metadataHasBeenSet = true; m_metadata = std::forward<MetadataT>(value); }
87 template<typename MetadataT = Aws::Map<Aws::String, Aws::String>>
88 PredictedItem& WithMetadata(MetadataT&& value) { SetMetadata(std::forward<MetadataT>(value)); return *this;}
89 template<typename MetadataKeyT = Aws::String, typename MetadataValueT = Aws::String>
90 PredictedItem& AddMetadata(MetadataKeyT&& key, MetadataValueT&& value) {
91 m_metadataHasBeenSet = true; m_metadata.emplace(std::forward<MetadataKeyT>(key), std::forward<MetadataValueT>(value)); return *this;
92 }
94
96
112 inline const Aws::Vector<Aws::String>& GetReason() const { return m_reason; }
113 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
114 template<typename ReasonT = Aws::Vector<Aws::String>>
115 void SetReason(ReasonT&& value) { m_reasonHasBeenSet = true; m_reason = std::forward<ReasonT>(value); }
116 template<typename ReasonT = Aws::Vector<Aws::String>>
117 PredictedItem& WithReason(ReasonT&& value) { SetReason(std::forward<ReasonT>(value)); return *this;}
118 template<typename ReasonT = Aws::String>
119 PredictedItem& AddReason(ReasonT&& value) { m_reasonHasBeenSet = true; m_reason.emplace_back(std::forward<ReasonT>(value)); return *this; }
121 private:
122
123 Aws::String m_itemId;
124 bool m_itemIdHasBeenSet = false;
125
126 double m_score{0.0};
127 bool m_scoreHasBeenSet = false;
128
129 Aws::String m_promotionName;
130 bool m_promotionNameHasBeenSet = false;
131
133 bool m_metadataHasBeenSet = false;
134
136 bool m_reasonHasBeenSet = false;
137 };
138
139} // namespace Model
140} // namespace PersonalizeRuntime
141} // namespace Aws
PredictedItem & WithMetadata(MetadataT &&value)
const Aws::String & GetPromotionName() const
const Aws::Map< Aws::String, Aws::String > & GetMetadata() const
AWS_PERSONALIZERUNTIME_API PredictedItem & operator=(Aws::Utils::Json::JsonView jsonValue)
PredictedItem & WithPromotionName(PromotionNameT &&value)
PredictedItem & WithItemId(ItemIdT &&value)
PredictedItem & AddMetadata(MetadataKeyT &&key, MetadataValueT &&value)
void SetPromotionName(PromotionNameT &&value)
PredictedItem & WithReason(ReasonT &&value)
PredictedItem & AddReason(ReasonT &&value)
AWS_PERSONALIZERUNTIME_API PredictedItem()=default
AWS_PERSONALIZERUNTIME_API PredictedItem(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetReason() const
AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
PredictedItem & WithScore(double 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
Aws::Utils::Json::JsonValue JsonValue