Class: AWSCDK::Connect::CfnEvaluationForm::EvaluationFormQuestionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Connect::CfnEvaluationForm::EvaluationFormQuestionProperty
- Defined in:
- connect/cfn_evaluation_form.rb
Overview
Information about a question from an evaluation form.
Instance Attribute Summary collapse
-
#enablement ⇒ AWSCDK::IResolvable, ...
readonly
A question conditional enablement.
-
#instructions ⇒ String?
readonly
The instructions of the section.
-
#not_applicable_enabled ⇒ Boolean, ...
readonly
The flag to enable not applicable answers to the question.
-
#question_type ⇒ String
readonly
The type of the question.
-
#question_type_properties ⇒ AWSCDK::IResolvable, ...
readonly
The properties of the type of question.
-
#ref_id ⇒ String
readonly
The identifier of the question.
-
#title ⇒ String
readonly
The title of the question.
-
#weight ⇒ Numeric?
readonly
The scoring weight of the section.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(question_type:, ref_id:, title:, enablement: nil, instructions: nil, not_applicable_enabled: nil, question_type_properties: nil, weight: nil) ⇒ EvaluationFormQuestionProperty
constructor
A new instance of EvaluationFormQuestionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(question_type:, ref_id:, title:, enablement: nil, instructions: nil, not_applicable_enabled: nil, question_type_properties: nil, weight: nil) ⇒ EvaluationFormQuestionProperty
Returns a new instance of EvaluationFormQuestionProperty.
1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 |
# File 'connect/cfn_evaluation_form.rb', line 1504 def initialize(question_type:, ref_id:, title:, enablement: nil, instructions: nil, not_applicable_enabled: nil, question_type_properties: nil, weight: nil) @question_type = question_type Jsii::Type.check_type(@question_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "questionType") @ref_id = ref_id Jsii::Type.check_type(@ref_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "refId") @title = title Jsii::Type.check_type(@title, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "title") @enablement = enablement.is_a?(Hash) ? ::AWSCDK::Connect::CfnEvaluationForm::EvaluationFormItemEnablementConfigurationProperty.new(**enablement.transform_keys(&:to_sym)) : enablement Jsii::Type.check_type(@enablement, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25uZWN0LkNmbkV2YWx1YXRpb25Gb3JtLkV2YWx1YXRpb25Gb3JtSXRlbUVuYWJsZW1lbnRDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "enablement") unless @enablement.nil? @instructions = instructions Jsii::Type.check_type(@instructions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instructions") unless @instructions.nil? @not_applicable_enabled = not_applicable_enabled Jsii::Type.check_type(@not_applicable_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "notApplicableEnabled") unless @not_applicable_enabled.nil? @question_type_properties = question_type_properties.is_a?(Hash) ? ::AWSCDK::Connect::CfnEvaluationForm::EvaluationFormQuestionTypePropertiesProperty.new(**question_type_properties.transform_keys(&:to_sym)) : question_type_properties Jsii::Type.check_type(@question_type_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25uZWN0LkNmbkV2YWx1YXRpb25Gb3JtLkV2YWx1YXRpb25Gb3JtUXVlc3Rpb25UeXBlUHJvcGVydGllc1Byb3BlcnR5In1dfX0=")), "questionTypeProperties") unless @question_type_properties.nil? @weight = weight Jsii::Type.check_type(@weight, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "weight") unless @weight.nil? end |
Instance Attribute Details
#enablement ⇒ AWSCDK::IResolvable, ... (readonly)
A question conditional enablement.
1548 1549 1550 |
# File 'connect/cfn_evaluation_form.rb', line 1548 def enablement @enablement end |
#instructions ⇒ String? (readonly)
The instructions of the section.
Length Constraints : Minimum length of 0. Maximum length of 1024.
1555 1556 1557 |
# File 'connect/cfn_evaluation_form.rb', line 1555 def instructions @instructions end |
#not_applicable_enabled ⇒ Boolean, ... (readonly)
The flag to enable not applicable answers to the question.
1560 1561 1562 |
# File 'connect/cfn_evaluation_form.rb', line 1560 def not_applicable_enabled @not_applicable_enabled end |
#question_type ⇒ String (readonly)
The type of the question.
Allowed values : NUMERIC | SINGLESELECT | TEXT
1529 1530 1531 |
# File 'connect/cfn_evaluation_form.rb', line 1529 def question_type @question_type end |
#question_type_properties ⇒ AWSCDK::IResolvable, ... (readonly)
The properties of the type of question.
Text questions do not have to define question type properties.
1567 1568 1569 |
# File 'connect/cfn_evaluation_form.rb', line 1567 def question_type_properties @question_type_properties end |
#ref_id ⇒ String (readonly)
The identifier of the question. An identifier must be unique within the evaluation form.
Length Constraints : Minimum length of 1. Maximum length of 40.
1536 1537 1538 |
# File 'connect/cfn_evaluation_form.rb', line 1536 def ref_id @ref_id end |
#title ⇒ String (readonly)
The title of the question.
Length Constraints : Minimum length of 1. Maximum length of 350.
1543 1544 1545 |
# File 'connect/cfn_evaluation_form.rb', line 1543 def title @title end |
#weight ⇒ Numeric? (readonly)
The scoring weight of the section.
Minimum : 0
Maximum : 100
1576 1577 1578 |
# File 'connect/cfn_evaluation_form.rb', line 1576 def weight @weight end |
Class Method Details
.jsii_properties ⇒ Object
1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 |
# File 'connect/cfn_evaluation_form.rb', line 1578 def self.jsii_properties { :question_type => "questionType", :ref_id => "refId", :title => "title", :enablement => "enablement", :instructions => "instructions", :not_applicable_enabled => "notApplicableEnabled", :question_type_properties => "questionTypeProperties", :weight => "weight", } end |
Instance Method Details
#to_jsii ⇒ Object
1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 |
# File 'connect/cfn_evaluation_form.rb', line 1591 def to_jsii result = {} result.merge!({ "questionType" => @question_type, "refId" => @ref_id, "title" => @title, "enablement" => @enablement, "instructions" => @instructions, "notApplicableEnabled" => @not_applicable_enabled, "questionTypeProperties" => @question_type_properties, "weight" => @weight, }) result.compact end |