Class: AWSCDK::Lex::CfnBot::ConditionalSpecificationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Lex::CfnBot::ConditionalSpecificationProperty
- Defined in:
- lex/cfn_bot.rb
Overview
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.
Instance Attribute Summary collapse
-
#conditional_branches ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Lex::CfnBot::ConditionalBranchProperty>
readonly
A list of conditional branches.
-
#default_branch ⇒ AWSCDK::IResolvable, AWSCDK::Lex::CfnBot::DefaultConditionalBranchProperty
readonly
The conditional branch that should be followed when the conditions for other branches are not satisfied.
-
#is_active ⇒ Boolean, AWSCDK::IResolvable
readonly
Determines whether a conditional branch is active.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(conditional_branches:, default_branch:, is_active:) ⇒ ConditionalSpecificationProperty
constructor
A new instance of ConditionalSpecificationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(conditional_branches:, default_branch:, is_active:) ⇒ ConditionalSpecificationProperty
Returns a new instance of ConditionalSpecificationProperty.
1818 1819 1820 1821 1822 1823 1824 1825 |
# File 'lex/cfn_bot.rb', line 1818 def initialize(conditional_branches:, default_branch:, is_active:) @conditional_branches = conditional_branches Jsii::Type.check_type(@conditional_branches, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGV4LkNmbkJvdC5Db25kaXRpb25hbEJyYW5jaFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "conditionalBranches") @default_branch = default_branch.is_a?(Hash) ? ::AWSCDK::Lex::CfnBot::DefaultConditionalBranchProperty.new(**default_branch.transform_keys(&:to_sym)) : default_branch Jsii::Type.check_type(@default_branch, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sZXguQ2ZuQm90LkRlZmF1bHRDb25kaXRpb25hbEJyYW5jaFByb3BlcnR5In1dfX0=")), "defaultBranch") @is_active = is_active Jsii::Type.check_type(@is_active, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "isActive") end |
Instance Attribute Details
#conditional_branches ⇒ AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::Lex::CfnBot::ConditionalBranchProperty> (readonly)
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.
1833 1834 1835 |
# File 'lex/cfn_bot.rb', line 1833 def conditional_branches @conditional_branches end |
#default_branch ⇒ AWSCDK::IResolvable, AWSCDK::Lex::CfnBot::DefaultConditionalBranchProperty (readonly)
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.
1840 1841 1842 |
# File 'lex/cfn_bot.rb', line 1840 def default_branch @default_branch end |
#is_active ⇒ Boolean, AWSCDK::IResolvable (readonly)
Determines whether a conditional branch is active.
When IsActive is false, the conditions are not evaluated.
1847 1848 1849 |
# File 'lex/cfn_bot.rb', line 1847 def is_active @is_active end |
Class Method Details
.jsii_properties ⇒ Object
1849 1850 1851 1852 1853 1854 1855 |
# File 'lex/cfn_bot.rb', line 1849 def self.jsii_properties { :conditional_branches => "conditionalBranches", :default_branch => "defaultBranch", :is_active => "isActive", } end |
Instance Method Details
#to_jsii ⇒ Object
1857 1858 1859 1860 1861 1862 1863 1864 1865 |
# File 'lex/cfn_bot.rb', line 1857 def to_jsii result = {} result.merge!({ "conditionalBranches" => @conditional_branches, "defaultBranch" => @default_branch, "isActive" => @is_active, }) result.compact end |