AWS SDK for C++

AWS SDK for C++ Version 1.11.860

Loading...
Searching...
No Matches
Treatment.h
1
6#pragma once
7#include <aws/appconfig/AppConfig_EXPORTS.h>
8#include <aws/appconfig/model/FlagValue.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace AppConfig {
21namespace Model {
22
29class Treatment {
30 public:
31 AWS_APPCONFIG_API Treatment() = default;
32 AWS_APPCONFIG_API Treatment(Aws::Utils::Json::JsonView jsonValue);
33 AWS_APPCONFIG_API Treatment& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APPCONFIG_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetKey() const { return m_key; }
41 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
42 template <typename KeyT = Aws::String>
43 void SetKey(KeyT&& value) {
44 m_keyHasBeenSet = true;
45 m_key = std::forward<KeyT>(value);
46 }
47 template <typename KeyT = Aws::String>
48 Treatment& WithKey(KeyT&& value) {
49 SetKey(std::forward<KeyT>(value));
50 return *this;
51 }
53
55
58 inline double GetWeight() const { return m_weight; }
59 inline bool WeightHasBeenSet() const { return m_weightHasBeenSet; }
60 inline void SetWeight(double value) {
61 m_weightHasBeenSet = true;
62 m_weight = value;
63 }
64 inline Treatment& WithWeight(double value) {
65 SetWeight(value);
66 return *this;
67 }
69
71
74 inline const Aws::String& GetDescription() const { return m_description; }
75 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
76 template <typename DescriptionT = Aws::String>
77 void SetDescription(DescriptionT&& value) {
78 m_descriptionHasBeenSet = true;
79 m_description = std::forward<DescriptionT>(value);
80 }
81 template <typename DescriptionT = Aws::String>
82 Treatment& WithDescription(DescriptionT&& value) {
83 SetDescription(std::forward<DescriptionT>(value));
84 return *this;
85 }
87
89
92 inline const FlagValue& GetFlagValue() const { return m_flagValue; }
93 inline bool FlagValueHasBeenSet() const { return m_flagValueHasBeenSet; }
94 template <typename FlagValueT = FlagValue>
95 void SetFlagValue(FlagValueT&& value) {
96 m_flagValueHasBeenSet = true;
97 m_flagValue = std::forward<FlagValueT>(value);
98 }
99 template <typename FlagValueT = FlagValue>
100 Treatment& WithFlagValue(FlagValueT&& value) {
101 SetFlagValue(std::forward<FlagValueT>(value));
102 return *this;
103 }
105 private:
106 Aws::String m_key;
107
108 double m_weight{0.0};
109
110 Aws::String m_description;
111
112 FlagValue m_flagValue;
113 bool m_keyHasBeenSet = false;
114 bool m_weightHasBeenSet = false;
115 bool m_descriptionHasBeenSet = false;
116 bool m_flagValueHasBeenSet = false;
117};
118
119} // namespace Model
120} // namespace AppConfig
121} // namespace Aws
Treatment & WithKey(KeyT &&value)
Definition Treatment.h:48
void SetFlagValue(FlagValueT &&value)
Definition Treatment.h:95
void SetWeight(double value)
Definition Treatment.h:60
AWS_APPCONFIG_API Aws::Utils::Json::JsonValue Jsonize() const
void SetDescription(DescriptionT &&value)
Definition Treatment.h:77
void SetKey(KeyT &&value)
Definition Treatment.h:43
Treatment & WithDescription(DescriptionT &&value)
Definition Treatment.h:82
Treatment & WithWeight(double value)
Definition Treatment.h:64
AWS_APPCONFIG_API Treatment & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetKey() const
Definition Treatment.h:40
AWS_APPCONFIG_API Treatment(Aws::Utils::Json::JsonView jsonValue)
AWS_APPCONFIG_API Treatment()=default
const FlagValue & GetFlagValue() const
Definition Treatment.h:92
Treatment & WithFlagValue(FlagValueT &&value)
Definition Treatment.h:100
const Aws::String & GetDescription() const
Definition Treatment.h:74
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue