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

Contains an Amazon Resource Name (ARN) and parameters that are associated * with the rule.

See Also:

AWS * API Reference

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

The type of attribute validation rule.

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

The type of attribute validation rule.

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

The type of attribute validation rule.

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

The type of attribute validation rule.

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

The type of attribute validation rule.

*/ inline Rule& WithType(const RuleType& value) { SetType(value); return *this;} /** *

The type of attribute validation rule.

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

The minimum and maximum parameters that are associated with the rule.

*/ inline const Aws::Map& GetParameters() const{ return m_parameters; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline void SetParameters(const Aws::Map& value) { m_parametersHasBeenSet = true; m_parameters = value; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline void SetParameters(Aws::Map&& value) { m_parametersHasBeenSet = true; m_parameters = std::move(value); } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& WithParameters(const Aws::Map& value) { SetParameters(value); return *this;} /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& WithParameters(Aws::Map&& value) { SetParameters(std::move(value)); return *this;} /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(const Aws::String& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(Aws::String&& key, const Aws::String& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(const Aws::String& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(Aws::String&& key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), std::move(value)); return *this; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(const char* key, Aws::String&& value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, std::move(value)); return *this; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(Aws::String&& key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(std::move(key), value); return *this; } /** *

The minimum and maximum parameters that are associated with the rule.

*/ inline Rule& AddParameters(const char* key, const char* value) { m_parametersHasBeenSet = true; m_parameters.emplace(key, value); return *this; } private: RuleType m_type; bool m_typeHasBeenSet = false; Aws::Map m_parameters; bool m_parametersHasBeenSet = false; }; } // namespace Model } // namespace CloudDirectory } // namespace Aws