/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudDirectory { namespace Model { /** *

A facet attribute definition. See Attribute * References for more information.

See Also:

AWS * API Reference

*/ class FacetAttributeDefinition { public: AWS_CLOUDDIRECTORY_API FacetAttributeDefinition(); AWS_CLOUDDIRECTORY_API FacetAttributeDefinition(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDDIRECTORY_API FacetAttributeDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDDIRECTORY_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The type of the attribute.

*/ inline const FacetAttributeType& GetType() const{ return m_type; } /** *

The type of the attribute.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of the attribute.

*/ inline void SetType(const FacetAttributeType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of the attribute.

*/ inline void SetType(FacetAttributeType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of the attribute.

*/ inline FacetAttributeDefinition& WithType(const FacetAttributeType& value) { SetType(value); return *this;} /** *

The type of the attribute.

*/ inline FacetAttributeDefinition& WithType(FacetAttributeType&& value) { SetType(std::move(value)); return *this;} /** *

The default value of the attribute (if configured).

*/ inline const TypedAttributeValue& GetDefaultValue() const{ return m_defaultValue; } /** *

The default value of the attribute (if configured).

*/ inline bool DefaultValueHasBeenSet() const { return m_defaultValueHasBeenSet; } /** *

The default value of the attribute (if configured).

*/ inline void SetDefaultValue(const TypedAttributeValue& value) { m_defaultValueHasBeenSet = true; m_defaultValue = value; } /** *

The default value of the attribute (if configured).

*/ inline void SetDefaultValue(TypedAttributeValue&& value) { m_defaultValueHasBeenSet = true; m_defaultValue = std::move(value); } /** *

The default value of the attribute (if configured).

*/ inline FacetAttributeDefinition& WithDefaultValue(const TypedAttributeValue& value) { SetDefaultValue(value); return *this;} /** *

The default value of the attribute (if configured).

*/ inline FacetAttributeDefinition& WithDefaultValue(TypedAttributeValue&& value) { SetDefaultValue(std::move(value)); return *this;} /** *

Whether the attribute is mutable or not.

*/ inline bool GetIsImmutable() const{ return m_isImmutable; } /** *

Whether the attribute is mutable or not.

*/ inline bool IsImmutableHasBeenSet() const { return m_isImmutableHasBeenSet; } /** *

Whether the attribute is mutable or not.

*/ inline void SetIsImmutable(bool value) { m_isImmutableHasBeenSet = true; m_isImmutable = value; } /** *

Whether the attribute is mutable or not.

*/ inline FacetAttributeDefinition& WithIsImmutable(bool value) { SetIsImmutable(value); return *this;} /** *

Validation rules attached to the attribute definition.

*/ inline const Aws::Map& GetRules() const{ return m_rules; } /** *

Validation rules attached to the attribute definition.

*/ inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; } /** *

Validation rules attached to the attribute definition.

*/ inline void SetRules(const Aws::Map& value) { m_rulesHasBeenSet = true; m_rules = value; } /** *

Validation rules attached to the attribute definition.

*/ inline void SetRules(Aws::Map&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); } /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& WithRules(const Aws::Map& value) { SetRules(value); return *this;} /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& WithRules(Aws::Map&& value) { SetRules(std::move(value)); return *this;} /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& AddRules(const Aws::String& key, const Rule& value) { m_rulesHasBeenSet = true; m_rules.emplace(key, value); return *this; } /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& AddRules(Aws::String&& key, const Rule& value) { m_rulesHasBeenSet = true; m_rules.emplace(std::move(key), value); return *this; } /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& AddRules(const Aws::String& key, Rule&& value) { m_rulesHasBeenSet = true; m_rules.emplace(key, std::move(value)); return *this; } /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& AddRules(Aws::String&& key, Rule&& value) { m_rulesHasBeenSet = true; m_rules.emplace(std::move(key), std::move(value)); return *this; } /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& AddRules(const char* key, Rule&& value) { m_rulesHasBeenSet = true; m_rules.emplace(key, std::move(value)); return *this; } /** *

Validation rules attached to the attribute definition.

*/ inline FacetAttributeDefinition& AddRules(const char* key, const Rule& value) { m_rulesHasBeenSet = true; m_rules.emplace(key, value); return *this; } private: FacetAttributeType m_type; bool m_typeHasBeenSet = false; TypedAttributeValue m_defaultValue; bool m_defaultValueHasBeenSet = false; bool m_isImmutable; bool m_isImmutableHasBeenSet = false; Aws::Map m_rules; bool m_rulesHasBeenSet = false; }; } // namespace Model } // namespace CloudDirectory } // namespace Aws