/** * 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 AccessAnalyzer { namespace Model { /** *

An criterion statement in an archive rule. Each archive rule may have * multiple criteria.

See Also:

AWS * API Reference

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

The name of the rule.

*/ inline const Aws::String& GetRuleName() const{ return m_ruleName; } /** *

The name of the rule.

*/ inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; } /** *

The name of the rule.

*/ inline void SetRuleName(const Aws::String& value) { m_ruleNameHasBeenSet = true; m_ruleName = value; } /** *

The name of the rule.

*/ inline void SetRuleName(Aws::String&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::move(value); } /** *

The name of the rule.

*/ inline void SetRuleName(const char* value) { m_ruleNameHasBeenSet = true; m_ruleName.assign(value); } /** *

The name of the rule.

*/ inline InlineArchiveRule& WithRuleName(const Aws::String& value) { SetRuleName(value); return *this;} /** *

The name of the rule.

*/ inline InlineArchiveRule& WithRuleName(Aws::String&& value) { SetRuleName(std::move(value)); return *this;} /** *

The name of the rule.

*/ inline InlineArchiveRule& WithRuleName(const char* value) { SetRuleName(value); return *this;} /** *

The condition and values for a criterion.

*/ inline const Aws::Map& GetFilter() const{ return m_filter; } /** *

The condition and values for a criterion.

*/ inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; } /** *

The condition and values for a criterion.

*/ inline void SetFilter(const Aws::Map& value) { m_filterHasBeenSet = true; m_filter = value; } /** *

The condition and values for a criterion.

*/ inline void SetFilter(Aws::Map&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); } /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& WithFilter(const Aws::Map& value) { SetFilter(value); return *this;} /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& WithFilter(Aws::Map&& value) { SetFilter(std::move(value)); return *this;} /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& AddFilter(const Aws::String& key, const Criterion& value) { m_filterHasBeenSet = true; m_filter.emplace(key, value); return *this; } /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& AddFilter(Aws::String&& key, const Criterion& value) { m_filterHasBeenSet = true; m_filter.emplace(std::move(key), value); return *this; } /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& AddFilter(const Aws::String& key, Criterion&& value) { m_filterHasBeenSet = true; m_filter.emplace(key, std::move(value)); return *this; } /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& AddFilter(Aws::String&& key, Criterion&& value) { m_filterHasBeenSet = true; m_filter.emplace(std::move(key), std::move(value)); return *this; } /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& AddFilter(const char* key, Criterion&& value) { m_filterHasBeenSet = true; m_filter.emplace(key, std::move(value)); return *this; } /** *

The condition and values for a criterion.

*/ inline InlineArchiveRule& AddFilter(const char* key, const Criterion& value) { m_filterHasBeenSet = true; m_filter.emplace(key, value); return *this; } private: Aws::String m_ruleName; bool m_ruleNameHasBeenSet = false; Aws::Map m_filter; bool m_filterHasBeenSet = false; }; } // namespace Model } // namespace AccessAnalyzer } // namespace Aws