AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetItemId(const Aws::String& value) { m_itemIdHasBeenSet = true; m_itemId = value; }
50 inline void SetItemId(Aws::String&& value) { m_itemIdHasBeenSet = true; m_itemId = std::move(value); }
51 inline void SetItemId(const char* value) { m_itemIdHasBeenSet = true; m_itemId.assign(value); }
52 inline PredictedItem& WithItemId(const Aws::String& value) { SetItemId(value); return *this;}
53 inline PredictedItem& WithItemId(Aws::String&& value) { SetItemId(std::move(value)); return *this;}
54 inline PredictedItem& WithItemId(const char* value) { SetItemId(value); return *this;}
56
58
63 inline double GetScore() const{ return m_score; }
64 inline bool ScoreHasBeenSet() const { return m_scoreHasBeenSet; }
65 inline void SetScore(double value) { m_scoreHasBeenSet = true; m_score = value; }
66 inline PredictedItem& WithScore(double value) { SetScore(value); return *this;}
68
70
73 inline const Aws::String& GetPromotionName() const{ return m_promotionName; }
74 inline bool PromotionNameHasBeenSet() const { return m_promotionNameHasBeenSet; }
75 inline void SetPromotionName(const Aws::String& value) { m_promotionNameHasBeenSet = true; m_promotionName = value; }
76 inline void SetPromotionName(Aws::String&& value) { m_promotionNameHasBeenSet = true; m_promotionName = std::move(value); }
77 inline void SetPromotionName(const char* value) { m_promotionNameHasBeenSet = true; m_promotionName.assign(value); }
78 inline PredictedItem& WithPromotionName(const Aws::String& value) { SetPromotionName(value); return *this;}
79 inline PredictedItem& WithPromotionName(Aws::String&& value) { SetPromotionName(std::move(value)); return *this;}
80 inline PredictedItem& WithPromotionName(const char* value) { SetPromotionName(value); return *this;}
82
84
87 inline const Aws::Map<Aws::String, Aws::String>& GetMetadata() const{ return m_metadata; }
88 inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
89 inline void SetMetadata(const Aws::Map<Aws::String, Aws::String>& value) { m_metadataHasBeenSet = true; m_metadata = value; }
90 inline void SetMetadata(Aws::Map<Aws::String, Aws::String>&& value) { m_metadataHasBeenSet = true; m_metadata = std::move(value); }
91 inline PredictedItem& WithMetadata(const Aws::Map<Aws::String, Aws::String>& value) { SetMetadata(value); return *this;}
92 inline PredictedItem& WithMetadata(Aws::Map<Aws::String, Aws::String>&& value) { SetMetadata(std::move(value)); return *this;}
93 inline PredictedItem& AddMetadata(const Aws::String& key, const Aws::String& value) { m_metadataHasBeenSet = true; m_metadata.emplace(key, value); return *this; }
94 inline PredictedItem& AddMetadata(Aws::String&& key, const Aws::String& value) { m_metadataHasBeenSet = true; m_metadata.emplace(std::move(key), value); return *this; }
95 inline PredictedItem& AddMetadata(const Aws::String& key, Aws::String&& value) { m_metadataHasBeenSet = true; m_metadata.emplace(key, std::move(value)); return *this; }
96 inline PredictedItem& AddMetadata(Aws::String&& key, Aws::String&& value) { m_metadataHasBeenSet = true; m_metadata.emplace(std::move(key), std::move(value)); return *this; }
97 inline PredictedItem& AddMetadata(const char* key, Aws::String&& value) { m_metadataHasBeenSet = true; m_metadata.emplace(key, std::move(value)); return *this; }
98 inline PredictedItem& AddMetadata(Aws::String&& key, const char* value) { m_metadataHasBeenSet = true; m_metadata.emplace(std::move(key), value); return *this; }
99 inline PredictedItem& AddMetadata(const char* key, const char* value) { m_metadataHasBeenSet = true; m_metadata.emplace(key, value); return *this; }
101
103
119 inline const Aws::Vector<Aws::String>& GetReason() const{ return m_reason; }
120 inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; }
121 inline void SetReason(const Aws::Vector<Aws::String>& value) { m_reasonHasBeenSet = true; m_reason = value; }
122 inline void SetReason(Aws::Vector<Aws::String>&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); }
123 inline PredictedItem& WithReason(const Aws::Vector<Aws::String>& value) { SetReason(value); return *this;}
124 inline PredictedItem& WithReason(Aws::Vector<Aws::String>&& value) { SetReason(std::move(value)); return *this;}
125 inline PredictedItem& AddReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason.push_back(value); return *this; }
126 inline PredictedItem& AddReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason.push_back(std::move(value)); return *this; }
127 inline PredictedItem& AddReason(const char* value) { m_reasonHasBeenSet = true; m_reason.push_back(value); return *this; }
129 private:
130
131 Aws::String m_itemId;
132 bool m_itemIdHasBeenSet = false;
133
134 double m_score;
135 bool m_scoreHasBeenSet = false;
136
137 Aws::String m_promotionName;
138 bool m_promotionNameHasBeenSet = false;
139
141 bool m_metadataHasBeenSet = false;
142
144 bool m_reasonHasBeenSet = false;
145 };
146
147} // namespace Model
148} // namespace PersonalizeRuntime
149} // namespace Aws
PredictedItem & WithPromotionName(const char *value)
PredictedItem & WithMetadata(const Aws::Map< Aws::String, Aws::String > &value)
PredictedItem & WithMetadata(Aws::Map< Aws::String, Aws::String > &&value)
const Aws::String & GetPromotionName() const
const Aws::Map< Aws::String, Aws::String > & GetMetadata() const
void SetReason(Aws::Vector< Aws::String > &&value)
PredictedItem & WithItemId(const char *value)
AWS_PERSONALIZERUNTIME_API PredictedItem & operator=(Aws::Utils::Json::JsonView jsonValue)
PredictedItem & WithItemId(Aws::String &&value)
PredictedItem & AddMetadata(const Aws::String &key, Aws::String &&value)
void SetPromotionName(const Aws::String &value)
PredictedItem & AddMetadata(const Aws::String &key, const Aws::String &value)
void SetItemId(const Aws::String &value)
PredictedItem & AddReason(const Aws::String &value)
PredictedItem & WithPromotionName(Aws::String &&value)
PredictedItem & AddMetadata(Aws::String &&key, const char *value)
PredictedItem & WithReason(const Aws::Vector< Aws::String > &value)
void SetMetadata(Aws::Map< Aws::String, Aws::String > &&value)
PredictedItem & WithItemId(const Aws::String &value)
PredictedItem & WithPromotionName(const Aws::String &value)
void SetMetadata(const Aws::Map< Aws::String, Aws::String > &value)
AWS_PERSONALIZERUNTIME_API PredictedItem()
PredictedItem & AddMetadata(Aws::String &&key, Aws::String &&value)
PredictedItem & AddMetadata(const char *key, const char *value)
PredictedItem & AddReason(const char *value)
AWS_PERSONALIZERUNTIME_API PredictedItem(Aws::Utils::Json::JsonView jsonValue)
PredictedItem & AddReason(Aws::String &&value)
void SetReason(const Aws::Vector< Aws::String > &value)
PredictedItem & AddMetadata(Aws::String &&key, const Aws::String &value)
const Aws::Vector< Aws::String > & GetReason() const
AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
PredictedItem & WithReason(Aws::Vector< Aws::String > &&value)
PredictedItem & WithScore(double value)
PredictedItem & AddMetadata(const char *key, Aws::String &&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