Class: AWSCDK::AmplifyUIBuilder::CfnForm::ValueMappingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
amplify_ui_builder/cfn_form.rb

Overview

The ValueMapping property specifies the association between a complex object and a display value.

Use ValueMapping to store how to represent complex objects when they are displayed.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, display_value: nil) ⇒ ValueMappingProperty

Returns a new instance of ValueMappingProperty.

Parameters:



1653
1654
1655
1656
1657
1658
# File 'amplify_ui_builder/cfn_form.rb', line 1653

def initialize(value:, display_value: nil)
  @value = value.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnForm::FormInputValuePropertyProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkZvcm0uRm9ybUlucHV0VmFsdWVQcm9wZXJ0eVByb3BlcnR5In1dfX0=")), "value")
  @display_value = display_value.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnForm::FormInputValuePropertyProperty.new(**display_value.transform_keys(&:to_sym)) : display_value
  Jsii::Type.check_type(@display_value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkZvcm0uRm9ybUlucHV0VmFsdWVQcm9wZXJ0eVByb3BlcnR5In1dfX0=")), "displayValue") unless @display_value.nil?
end

Class Method Details

.jsii_propertiesObject



1671
1672
1673
1674
1675
1676
# File 'amplify_ui_builder/cfn_form.rb', line 1671

def self.jsii_properties
  {
    :value => "value",
    :display_value => "displayValue",
  }
end

Instance Method Details

#to_jsiiObject



1678
1679
1680
1681
1682
1683
1684
1685
# File 'amplify_ui_builder/cfn_form.rb', line 1678

def to_jsii
  result = {}
  result.merge!({
    "value" => @value,
    "displayValue" => @display_value,
  })
  result.compact
end