AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
Promotion.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/personalize-runtime/PersonalizeRuntime_EXPORTS.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace PersonalizeRuntime {
21namespace Model {
22
30class Promotion {
31 public:
32 AWS_PERSONALIZERUNTIME_API Promotion() = default;
33 AWS_PERSONALIZERUNTIME_API Promotion(Aws::Utils::Json::JsonView jsonValue);
34 AWS_PERSONALIZERUNTIME_API Promotion& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetName() const { return m_name; }
42 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
43 template <typename NameT = Aws::String>
44 void SetName(NameT&& value) {
45 m_nameHasBeenSet = true;
46 m_name = std::forward<NameT>(value);
47 }
48 template <typename NameT = Aws::String>
49 Promotion& WithName(NameT&& value) {
50 SetName(std::forward<NameT>(value));
51 return *this;
52 }
54
56
59 inline int GetPercentPromotedItems() const { return m_percentPromotedItems; }
60 inline bool PercentPromotedItemsHasBeenSet() const { return m_percentPromotedItemsHasBeenSet; }
61 inline void SetPercentPromotedItems(int value) {
62 m_percentPromotedItemsHasBeenSet = true;
63 m_percentPromotedItems = value;
64 }
67 return *this;
68 }
70
72
78 inline const Aws::String& GetFilterArn() const { return m_filterArn; }
79 inline bool FilterArnHasBeenSet() const { return m_filterArnHasBeenSet; }
80 template <typename FilterArnT = Aws::String>
81 void SetFilterArn(FilterArnT&& value) {
82 m_filterArnHasBeenSet = true;
83 m_filterArn = std::forward<FilterArnT>(value);
84 }
85 template <typename FilterArnT = Aws::String>
86 Promotion& WithFilterArn(FilterArnT&& value) {
87 SetFilterArn(std::forward<FilterArnT>(value));
88 return *this;
89 }
91
93
107 inline const Aws::Map<Aws::String, Aws::String>& GetFilterValues() const { return m_filterValues; }
108 inline bool FilterValuesHasBeenSet() const { return m_filterValuesHasBeenSet; }
109 template <typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
110 void SetFilterValues(FilterValuesT&& value) {
111 m_filterValuesHasBeenSet = true;
112 m_filterValues = std::forward<FilterValuesT>(value);
113 }
114 template <typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
115 Promotion& WithFilterValues(FilterValuesT&& value) {
116 SetFilterValues(std::forward<FilterValuesT>(value));
117 return *this;
118 }
119 template <typename FilterValuesKeyT = Aws::String, typename FilterValuesValueT = Aws::String>
120 Promotion& AddFilterValues(FilterValuesKeyT&& key, FilterValuesValueT&& value) {
121 m_filterValuesHasBeenSet = true;
122 m_filterValues.emplace(std::forward<FilterValuesKeyT>(key), std::forward<FilterValuesValueT>(value));
123 return *this;
124 }
126 private:
127 Aws::String m_name;
128
129 int m_percentPromotedItems{0};
130
131 Aws::String m_filterArn;
132
134 bool m_nameHasBeenSet = false;
135 bool m_percentPromotedItemsHasBeenSet = false;
136 bool m_filterArnHasBeenSet = false;
137 bool m_filterValuesHasBeenSet = false;
138};
139
140} // namespace Model
141} // namespace PersonalizeRuntime
142} // namespace Aws
void SetFilterArn(FilterArnT &&value)
Definition Promotion.h:81
Promotion & WithFilterValues(FilterValuesT &&value)
Definition Promotion.h:115
const Aws::String & GetFilterArn() const
Definition Promotion.h:78
void SetFilterValues(FilterValuesT &&value)
Definition Promotion.h:110
AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetName() const
Definition Promotion.h:41
AWS_PERSONALIZERUNTIME_API Promotion & operator=(Aws::Utils::Json::JsonView jsonValue)
Promotion & WithPercentPromotedItems(int value)
Definition Promotion.h:65
AWS_PERSONALIZERUNTIME_API Promotion()=default
Promotion & WithName(NameT &&value)
Definition Promotion.h:49
Promotion & AddFilterValues(FilterValuesKeyT &&key, FilterValuesValueT &&value)
Definition Promotion.h:120
const Aws::Map< Aws::String, Aws::String > & GetFilterValues() const
Definition Promotion.h:107
Promotion & WithFilterArn(FilterArnT &&value)
Definition Promotion.h:86
AWS_PERSONALIZERUNTIME_API Promotion(Aws::Utils::Json::JsonView jsonValue)
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
Aws::Utils::Json::JsonValue JsonValue