Class: AWSCDK::Connect::CfnEvaluationForm::EvaluationFormSingleSelectQuestionOptionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
connect/cfn_evaluation_form.rb

Overview

Information about the automation configuration in single select questions.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ref_id:, text:, automatic_fail: nil, automatic_fail_configuration: nil, score: nil) ⇒ EvaluationFormSingleSelectQuestionOptionProperty

Returns a new instance of EvaluationFormSingleSelectQuestionOptionProperty.

Parameters:

  • ref_id (String)

    The identifier of the answer option. An identifier must be unique within the question.

  • text (String)

    The title of the answer option.

  • automatic_fail (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    The flag to mark the option as automatic fail.

  • automatic_fail_configuration (AWSCDK::IResolvable, AWSCDK::Connect::CfnEvaluationForm::AutomaticFailConfigurationProperty, nil) (defaults to: nil)

    Whether automatic fail is configured on a single select question.

  • score (Numeric, nil) (defaults to: nil)

    The score assigned to the answer option.



1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
# File 'connect/cfn_evaluation_form.rb', line 1862

def initialize(ref_id:, text:, automatic_fail: nil, automatic_fail_configuration: nil, score: nil)
  @ref_id = ref_id
  Jsii::Type.check_type(@ref_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "refId")
  @text = text
  Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text")
  @automatic_fail = automatic_fail
  Jsii::Type.check_type(@automatic_fail, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "automaticFail") unless @automatic_fail.nil?
  @automatic_fail_configuration = automatic_fail_configuration.is_a?(Hash) ? ::AWSCDK::Connect::CfnEvaluationForm::AutomaticFailConfigurationProperty.new(**automatic_fail_configuration.transform_keys(&:to_sym)) : automatic_fail_configuration
  Jsii::Type.check_type(@automatic_fail_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb25uZWN0LkNmbkV2YWx1YXRpb25Gb3JtLkF1dG9tYXRpY0ZhaWxDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "automaticFailConfiguration") unless @automatic_fail_configuration.nil?
  @score = score
  Jsii::Type.check_type(@score, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "score") unless @score.nil?
end

Instance Attribute Details

#automatic_failBoolean, ... (readonly)

The flag to mark the option as automatic fail.

If an automatic fail answer is provided, the overall evaluation gets a score of 0.



1895
1896
1897
# File 'connect/cfn_evaluation_form.rb', line 1895

def automatic_fail
  @automatic_fail
end

#automatic_fail_configurationAWSCDK::IResolvable, ... (readonly)

Whether automatic fail is configured on a single select question.



1900
1901
1902
# File 'connect/cfn_evaluation_form.rb', line 1900

def automatic_fail_configuration
  @automatic_fail_configuration
end

#ref_idString (readonly)

The identifier of the answer option. An identifier must be unique within the question.

Length Constraints : Minimum length of 1. Maximum length of 40.



1881
1882
1883
# File 'connect/cfn_evaluation_form.rb', line 1881

def ref_id
  @ref_id
end

#scoreNumeric? (readonly)

The score assigned to the answer option.

Minimum : 0

Maximum : 10



1909
1910
1911
# File 'connect/cfn_evaluation_form.rb', line 1909

def score
  @score
end

#textString (readonly)

The title of the answer option.

Length Constraints : Minimum length of 1. Maximum length of 128.



1888
1889
1890
# File 'connect/cfn_evaluation_form.rb', line 1888

def text
  @text
end

Class Method Details

.jsii_propertiesObject



1911
1912
1913
1914
1915
1916
1917
1918
1919
# File 'connect/cfn_evaluation_form.rb', line 1911

def self.jsii_properties
  {
    :ref_id => "refId",
    :text => "text",
    :automatic_fail => "automaticFail",
    :automatic_fail_configuration => "automaticFailConfiguration",
    :score => "score",
  }
end

Instance Method Details

#to_jsiiObject



1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
# File 'connect/cfn_evaluation_form.rb', line 1921

def to_jsii
  result = {}
  result.merge!({
    "refId" => @ref_id,
    "text" => @text,
    "automaticFail" => @automatic_fail,
    "automaticFailConfiguration" => @automatic_fail_configuration,
    "score" => @score,
  })
  result.compact
end