AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
Promotion.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 <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace PersonalizeRuntime
23{
24namespace Model
25{
26
35 {
36 public:
37 AWS_PERSONALIZERUNTIME_API Promotion() = default;
38 AWS_PERSONALIZERUNTIME_API Promotion(Aws::Utils::Json::JsonView jsonValue);
39 AWS_PERSONALIZERUNTIME_API Promotion& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
47 inline const Aws::String& GetName() const { return m_name; }
48 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
49 template<typename NameT = Aws::String>
50 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
51 template<typename NameT = Aws::String>
52 Promotion& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
54
56
59 inline int GetPercentPromotedItems() const { return m_percentPromotedItems; }
60 inline bool PercentPromotedItemsHasBeenSet() const { return m_percentPromotedItemsHasBeenSet; }
61 inline void SetPercentPromotedItems(int value) { m_percentPromotedItemsHasBeenSet = true; m_percentPromotedItems = value; }
62 inline Promotion& WithPercentPromotedItems(int value) { SetPercentPromotedItems(value); return *this;}
64
66
72 inline const Aws::String& GetFilterArn() const { return m_filterArn; }
73 inline bool FilterArnHasBeenSet() const { return m_filterArnHasBeenSet; }
74 template<typename FilterArnT = Aws::String>
75 void SetFilterArn(FilterArnT&& value) { m_filterArnHasBeenSet = true; m_filterArn = std::forward<FilterArnT>(value); }
76 template<typename FilterArnT = Aws::String>
77 Promotion& WithFilterArn(FilterArnT&& value) { SetFilterArn(std::forward<FilterArnT>(value)); return *this;}
79
81
95 inline const Aws::Map<Aws::String, Aws::String>& GetFilterValues() const { return m_filterValues; }
96 inline bool FilterValuesHasBeenSet() const { return m_filterValuesHasBeenSet; }
97 template<typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
98 void SetFilterValues(FilterValuesT&& value) { m_filterValuesHasBeenSet = true; m_filterValues = std::forward<FilterValuesT>(value); }
99 template<typename FilterValuesT = Aws::Map<Aws::String, Aws::String>>
100 Promotion& WithFilterValues(FilterValuesT&& value) { SetFilterValues(std::forward<FilterValuesT>(value)); return *this;}
101 template<typename FilterValuesKeyT = Aws::String, typename FilterValuesValueT = Aws::String>
102 Promotion& AddFilterValues(FilterValuesKeyT&& key, FilterValuesValueT&& value) {
103 m_filterValuesHasBeenSet = true; m_filterValues.emplace(std::forward<FilterValuesKeyT>(key), std::forward<FilterValuesValueT>(value)); return *this;
104 }
106 private:
107
108 Aws::String m_name;
109 bool m_nameHasBeenSet = false;
110
111 int m_percentPromotedItems{0};
112 bool m_percentPromotedItemsHasBeenSet = false;
113
114 Aws::String m_filterArn;
115 bool m_filterArnHasBeenSet = false;
116
118 bool m_filterValuesHasBeenSet = false;
119 };
120
121} // namespace Model
122} // namespace PersonalizeRuntime
123} // namespace Aws
void SetFilterArn(FilterArnT &&value)
Definition Promotion.h:75
Promotion & WithFilterValues(FilterValuesT &&value)
Definition Promotion.h:100
const Aws::String & GetFilterArn() const
Definition Promotion.h:72
void SetFilterValues(FilterValuesT &&value)
Definition Promotion.h:98
AWS_PERSONALIZERUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetName() const
Definition Promotion.h:47
AWS_PERSONALIZERUNTIME_API Promotion & operator=(Aws::Utils::Json::JsonView jsonValue)
Promotion & WithPercentPromotedItems(int value)
Definition Promotion.h:62
AWS_PERSONALIZERUNTIME_API Promotion()=default
Promotion & WithName(NameT &&value)
Definition Promotion.h:52
Promotion & AddFilterValues(FilterValuesKeyT &&key, FilterValuesValueT &&value)
Definition Promotion.h:102
const Aws::Map< Aws::String, Aws::String > & GetFilterValues() const
Definition Promotion.h:95
Promotion & WithFilterArn(FilterArnT &&value)
Definition Promotion.h:77
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