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

Represents an object when updating a rule.

See Also:

AWS * API Reference

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

The rule action.

*/ inline const RuleAction& GetAction() const{ return m_action; } /** *

The rule action.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The rule action.

*/ inline void SetAction(const RuleAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The rule action.

*/ inline void SetAction(RuleAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The rule action.

*/ inline RuleUpdate& WithAction(const RuleAction& value) { SetAction(value); return *this;} /** *

The rule action.

*/ inline RuleUpdate& WithAction(RuleAction&& value) { SetAction(std::move(value)); return *this;} /** *

The rule match.

*/ inline const RuleMatch& GetMatch() const{ return m_match; } /** *

The rule match.

*/ inline bool MatchHasBeenSet() const { return m_matchHasBeenSet; } /** *

The rule match.

*/ inline void SetMatch(const RuleMatch& value) { m_matchHasBeenSet = true; m_match = value; } /** *

The rule match.

*/ inline void SetMatch(RuleMatch&& value) { m_matchHasBeenSet = true; m_match = std::move(value); } /** *

The rule match.

*/ inline RuleUpdate& WithMatch(const RuleMatch& value) { SetMatch(value); return *this;} /** *

The rule match.

*/ inline RuleUpdate& WithMatch(RuleMatch&& value) { SetMatch(std::move(value)); return *this;} /** *

The rule priority. A listener can't have multiple rules with the same * priority.

*/ inline int GetPriority() const{ return m_priority; } /** *

The rule priority. A listener can't have multiple rules with the same * priority.

*/ inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; } /** *

The rule priority. A listener can't have multiple rules with the same * priority.

*/ inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; } /** *

The rule priority. A listener can't have multiple rules with the same * priority.

*/ inline RuleUpdate& WithPriority(int value) { SetPriority(value); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline const Aws::String& GetRuleIdentifier() const{ return m_ruleIdentifier; } /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline bool RuleIdentifierHasBeenSet() const { return m_ruleIdentifierHasBeenSet; } /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline void SetRuleIdentifier(const Aws::String& value) { m_ruleIdentifierHasBeenSet = true; m_ruleIdentifier = value; } /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline void SetRuleIdentifier(Aws::String&& value) { m_ruleIdentifierHasBeenSet = true; m_ruleIdentifier = std::move(value); } /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline void SetRuleIdentifier(const char* value) { m_ruleIdentifierHasBeenSet = true; m_ruleIdentifier.assign(value); } /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline RuleUpdate& WithRuleIdentifier(const Aws::String& value) { SetRuleIdentifier(value); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline RuleUpdate& WithRuleIdentifier(Aws::String&& value) { SetRuleIdentifier(std::move(value)); return *this;} /** *

The ID or Amazon Resource Name (ARN) of the rule.

*/ inline RuleUpdate& WithRuleIdentifier(const char* value) { SetRuleIdentifier(value); return *this;} private: RuleAction m_action; bool m_actionHasBeenSet = false; RuleMatch m_match; bool m_matchHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; Aws::String m_ruleIdentifier; bool m_ruleIdentifierHasBeenSet = false; }; } // namespace Model } // namespace VPCLattice } // namespace Aws