AWS SDK for C++

AWS SDK for C++ Version 1.11.924

Loading...
Searching...
No Matches
FacetAttributeDefinition.h
1
6#pragma once
7#include <aws/clouddirectory/CloudDirectory_EXPORTS.h>
8#include <aws/clouddirectory/model/FacetAttributeType.h>
9#include <aws/clouddirectory/model/Rule.h>
10#include <aws/clouddirectory/model/TypedAttributeValue.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace CloudDirectory {
24namespace Model {
25
34 public:
35 AWS_CLOUDDIRECTORY_API FacetAttributeDefinition() = default;
36 AWS_CLOUDDIRECTORY_API FacetAttributeDefinition(Aws::Utils::Json::JsonView jsonValue);
38 AWS_CLOUDDIRECTORY_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
44 inline FacetAttributeType GetType() const { return m_type; }
45 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
46 inline void SetType(FacetAttributeType value) {
47 m_typeHasBeenSet = true;
48 m_type = value;
49 }
51 SetType(value);
52 return *this;
53 }
55
57
60 inline const TypedAttributeValue& GetDefaultValue() const { return m_defaultValue; }
61 inline bool DefaultValueHasBeenSet() const { return m_defaultValueHasBeenSet; }
62 template <typename DefaultValueT = TypedAttributeValue>
63 void SetDefaultValue(DefaultValueT&& value) {
64 m_defaultValueHasBeenSet = true;
65 m_defaultValue = std::forward<DefaultValueT>(value);
66 }
67 template <typename DefaultValueT = TypedAttributeValue>
69 SetDefaultValue(std::forward<DefaultValueT>(value));
70 return *this;
71 }
73
75
78 inline bool GetIsImmutable() const { return m_isImmutable; }
79 inline bool IsImmutableHasBeenSet() const { return m_isImmutableHasBeenSet; }
80 inline void SetIsImmutable(bool value) {
81 m_isImmutableHasBeenSet = true;
82 m_isImmutable = value;
83 }
85 SetIsImmutable(value);
86 return *this;
87 }
89
91
94 inline const Aws::Map<Aws::String, Rule>& GetRules() const { return m_rules; }
95 inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
96 template <typename RulesT = Aws::Map<Aws::String, Rule>>
97 void SetRules(RulesT&& value) {
98 m_rulesHasBeenSet = true;
99 m_rules = std::forward<RulesT>(value);
100 }
101 template <typename RulesT = Aws::Map<Aws::String, Rule>>
103 SetRules(std::forward<RulesT>(value));
104 return *this;
105 }
106 template <typename RulesKeyT = Aws::String, typename RulesValueT = Rule>
107 FacetAttributeDefinition& AddRules(RulesKeyT&& key, RulesValueT&& value) {
108 m_rulesHasBeenSet = true;
109 m_rules.emplace(std::forward<RulesKeyT>(key), std::forward<RulesValueT>(value));
110 return *this;
111 }
113 private:
115
116 TypedAttributeValue m_defaultValue;
117
118 bool m_isImmutable{false};
119
121 bool m_typeHasBeenSet = false;
122 bool m_defaultValueHasBeenSet = false;
123 bool m_isImmutableHasBeenSet = false;
124 bool m_rulesHasBeenSet = false;
125};
126
127} // namespace Model
128} // namespace CloudDirectory
129} // namespace Aws
FacetAttributeDefinition & WithRules(RulesT &&value)
AWS_CLOUDDIRECTORY_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_CLOUDDIRECTORY_API FacetAttributeDefinition()=default
FacetAttributeDefinition & AddRules(RulesKeyT &&key, RulesValueT &&value)
FacetAttributeDefinition & WithType(FacetAttributeType value)
AWS_CLOUDDIRECTORY_API FacetAttributeDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_CLOUDDIRECTORY_API FacetAttributeDefinition(Aws::Utils::Json::JsonView jsonValue)
const Aws::Map< Aws::String, Rule > & GetRules() const
FacetAttributeDefinition & WithDefaultValue(DefaultValueT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue