AWS SDK for C++

AWS SDK for C++ Version 1.11.848

Loading...
Searching...
No Matches
FlagValue.h
1
6#pragma once
7#include <aws/appconfig/AppConfig_EXPORTS.h>
8#include <aws/appconfig/model/AttributeValue.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace AppConfig {
22namespace Model {
23
30class FlagValue {
31 public:
32 AWS_APPCONFIG_API FlagValue() = default;
33 AWS_APPCONFIG_API FlagValue(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APPCONFIG_API FlagValue& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_APPCONFIG_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline bool GetEnabled() const { return m_enabled; }
42 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
43 inline void SetEnabled(bool value) {
44 m_enabledHasBeenSet = true;
45 m_enabled = value;
46 }
47 inline FlagValue& WithEnabled(bool value) {
48 SetEnabled(value);
49 return *this;
50 }
52
54
57 inline const Aws::Map<Aws::String, AttributeValue>& GetAttributeValues() const { return m_attributeValues; }
58 inline bool AttributeValuesHasBeenSet() const { return m_attributeValuesHasBeenSet; }
59 template <typename AttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
60 void SetAttributeValues(AttributeValuesT&& value) {
61 m_attributeValuesHasBeenSet = true;
62 m_attributeValues = std::forward<AttributeValuesT>(value);
63 }
64 template <typename AttributeValuesT = Aws::Map<Aws::String, AttributeValue>>
65 FlagValue& WithAttributeValues(AttributeValuesT&& value) {
66 SetAttributeValues(std::forward<AttributeValuesT>(value));
67 return *this;
68 }
69 template <typename AttributeValuesKeyT = Aws::String, typename AttributeValuesValueT = AttributeValue>
70 FlagValue& AddAttributeValues(AttributeValuesKeyT&& key, AttributeValuesValueT&& value) {
71 m_attributeValuesHasBeenSet = true;
72 m_attributeValues.emplace(std::forward<AttributeValuesKeyT>(key), std::forward<AttributeValuesValueT>(value));
73 return *this;
74 }
76 private:
77 bool m_enabled{false};
78
80 bool m_enabledHasBeenSet = false;
81 bool m_attributeValuesHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace AppConfig
86} // namespace Aws
AWS_APPCONFIG_API FlagValue(Aws::Utils::Json::JsonView jsonValue)
FlagValue & WithEnabled(bool value)
Definition FlagValue.h:47
AWS_APPCONFIG_API FlagValue & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetAttributeValues(AttributeValuesT &&value)
Definition FlagValue.h:60
AWS_APPCONFIG_API FlagValue()=default
bool AttributeValuesHasBeenSet() const
Definition FlagValue.h:58
FlagValue & WithAttributeValues(AttributeValuesT &&value)
Definition FlagValue.h:65
FlagValue & AddAttributeValues(AttributeValuesKeyT &&key, AttributeValuesValueT &&value)
Definition FlagValue.h:70
AWS_APPCONFIG_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Map< Aws::String, AttributeValue > & GetAttributeValues() const
Definition FlagValue.h:57
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue