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

Provides a list of conditional branches. Branches are evaluated in the order * that they are entered in the list. The first branch with a condition that * evaluates to true is executed. The last branch in the list is the default * branch. The default branch should not have any condition expression. The default * branch is executed if no other branch has a matching condition.

See * Also:

AWS * API Reference

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

Determines whether a conditional branch is active. When active * is false, the conditions are not evaluated.

*/ inline bool GetActive() const{ return m_active; } /** *

Determines whether a conditional branch is active. When active * is false, the conditions are not evaluated.

*/ inline bool ActiveHasBeenSet() const { return m_activeHasBeenSet; } /** *

Determines whether a conditional branch is active. When active * is false, the conditions are not evaluated.

*/ inline void SetActive(bool value) { m_activeHasBeenSet = true; m_active = value; } /** *

Determines whether a conditional branch is active. When active * is false, the conditions are not evaluated.

*/ inline ConditionalSpecification& WithActive(bool value) { SetActive(value); return *this;} /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline const Aws::Vector& GetConditionalBranches() const{ return m_conditionalBranches; } /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline bool ConditionalBranchesHasBeenSet() const { return m_conditionalBranchesHasBeenSet; } /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline void SetConditionalBranches(const Aws::Vector& value) { m_conditionalBranchesHasBeenSet = true; m_conditionalBranches = value; } /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline void SetConditionalBranches(Aws::Vector&& value) { m_conditionalBranchesHasBeenSet = true; m_conditionalBranches = std::move(value); } /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline ConditionalSpecification& WithConditionalBranches(const Aws::Vector& value) { SetConditionalBranches(value); return *this;} /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline ConditionalSpecification& WithConditionalBranches(Aws::Vector&& value) { SetConditionalBranches(std::move(value)); return *this;} /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline ConditionalSpecification& AddConditionalBranches(const ConditionalBranch& value) { m_conditionalBranchesHasBeenSet = true; m_conditionalBranches.push_back(value); return *this; } /** *

A list of conditional branches. A conditional branch is made up of a * condition, a response and a next step. The response and next step are executed * when the condition is true.

*/ inline ConditionalSpecification& AddConditionalBranches(ConditionalBranch&& value) { m_conditionalBranchesHasBeenSet = true; m_conditionalBranches.push_back(std::move(value)); return *this; } /** *

The conditional branch that should be followed when the conditions for other * branches are not satisfied. A conditional branch is made up of a condition, a * response and a next step.

*/ inline const DefaultConditionalBranch& GetDefaultBranch() const{ return m_defaultBranch; } /** *

The conditional branch that should be followed when the conditions for other * branches are not satisfied. A conditional branch is made up of a condition, a * response and a next step.

*/ inline bool DefaultBranchHasBeenSet() const { return m_defaultBranchHasBeenSet; } /** *

The conditional branch that should be followed when the conditions for other * branches are not satisfied. A conditional branch is made up of a condition, a * response and a next step.

*/ inline void SetDefaultBranch(const DefaultConditionalBranch& value) { m_defaultBranchHasBeenSet = true; m_defaultBranch = value; } /** *

The conditional branch that should be followed when the conditions for other * branches are not satisfied. A conditional branch is made up of a condition, a * response and a next step.

*/ inline void SetDefaultBranch(DefaultConditionalBranch&& value) { m_defaultBranchHasBeenSet = true; m_defaultBranch = std::move(value); } /** *

The conditional branch that should be followed when the conditions for other * branches are not satisfied. A conditional branch is made up of a condition, a * response and a next step.

*/ inline ConditionalSpecification& WithDefaultBranch(const DefaultConditionalBranch& value) { SetDefaultBranch(value); return *this;} /** *

The conditional branch that should be followed when the conditions for other * branches are not satisfied. A conditional branch is made up of a condition, a * response and a next step.

*/ inline ConditionalSpecification& WithDefaultBranch(DefaultConditionalBranch&& value) { SetDefaultBranch(std::move(value)); return *this;} private: bool m_active; bool m_activeHasBeenSet = false; Aws::Vector m_conditionalBranches; bool m_conditionalBranchesHasBeenSet = false; DefaultConditionalBranch m_defaultBranch; bool m_defaultBranchHasBeenSet = false; }; } // namespace Model } // namespace LexModelsV2 } // namespace Aws