Class: AWSCDK::AmplifyUIBuilder::CfnForm::SectionalElementProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::AmplifyUIBuilder::CfnForm::SectionalElementProperty
- Defined in:
- amplify_ui_builder/cfn_form.rb
Overview
The SectionalElement property specifies the configuration information for a visual helper element for a form.
A sectional element can be a header, a text block, or a divider. These elements are static and not associated with any data.
Instance Attribute Summary collapse
-
#excluded ⇒ Boolean, ...
readonly
Excludes a sectional element that was generated by default for a specified data model.
-
#level ⇒ Numeric?
readonly
Specifies the size of the font for a
Headingsectional element. -
#orientation ⇒ String?
readonly
Specifies the orientation for a
Dividersectional element. -
#position ⇒ AWSCDK::IResolvable, ...
readonly
Specifies the position of the text in a field for a
Textsectional element. -
#text ⇒ String?
readonly
The text for a
Textsectional element. -
#type ⇒ String
readonly
The type of sectional element.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, excluded: nil, level: nil, orientation: nil, position: nil, text: nil) ⇒ SectionalElementProperty
constructor
A new instance of SectionalElementProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(type:, excluded: nil, level: nil, orientation: nil, position: nil, text: nil) ⇒ SectionalElementProperty
Returns a new instance of SectionalElementProperty.
1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 |
# File 'amplify_ui_builder/cfn_form.rb', line 1566 def initialize(type:, excluded: nil, level: nil, orientation: nil, position: nil, text: nil) @type = type Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") @excluded = excluded Jsii::Type.check_type(@excluded, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "excluded") unless @excluded.nil? @level = level Jsii::Type.check_type(@level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "level") unless @level.nil? @orientation = orientation Jsii::Type.check_type(@orientation, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "orientation") unless @orientation.nil? @position = position.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnForm::FieldPositionProperty.new(**position.transform_keys(&:to_sym)) : position Jsii::Type.check_type(@position, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkZvcm0uRmllbGRQb3NpdGlvblByb3BlcnR5In1dfX0=")), "position") unless @position.nil? @text = text Jsii::Type.check_type(@text, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "text") unless @text.nil? end |
Instance Attribute Details
#excluded ⇒ Boolean, ... (readonly)
Excludes a sectional element that was generated by default for a specified data model.
1592 1593 1594 |
# File 'amplify_ui_builder/cfn_form.rb', line 1592 def excluded @excluded end |
#level ⇒ Numeric? (readonly)
Specifies the size of the font for a Heading sectional element.
Valid values are 1 | 2 | 3 | 4 | 5 | 6 .
1599 1600 1601 |
# File 'amplify_ui_builder/cfn_form.rb', line 1599 def level @level end |
#orientation ⇒ String? (readonly)
Specifies the orientation for a Divider sectional element.
Valid values are horizontal or vertical .
1606 1607 1608 |
# File 'amplify_ui_builder/cfn_form.rb', line 1606 def orientation @orientation end |
#position ⇒ AWSCDK::IResolvable, ... (readonly)
Specifies the position of the text in a field for a Text sectional element.
1611 1612 1613 |
# File 'amplify_ui_builder/cfn_form.rb', line 1611 def position @position end |
#text ⇒ String? (readonly)
The text for a Text sectional element.
1616 1617 1618 |
# File 'amplify_ui_builder/cfn_form.rb', line 1616 def text @text end |
#type ⇒ String (readonly)
The type of sectional element.
Valid values are Heading , Text , and Divider .
1587 1588 1589 |
# File 'amplify_ui_builder/cfn_form.rb', line 1587 def type @type end |
Class Method Details
.jsii_properties ⇒ Object
1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 |
# File 'amplify_ui_builder/cfn_form.rb', line 1618 def self.jsii_properties { :type => "type", :excluded => "excluded", :level => "level", :orientation => "orientation", :position => "position", :text => "text", } end |
Instance Method Details
#to_jsii ⇒ Object
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 |
# File 'amplify_ui_builder/cfn_form.rb', line 1629 def to_jsii result = {} result.merge!({ "type" => @type, "excluded" => @excluded, "level" => @level, "orientation" => @orientation, "position" => @position, "text" => @text, }) result.compact end |