Class: AWSCDK::AmplifyUIBuilder::CfnComponent::ComponentChildProperty

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

Overview

The ComponentChild property specifies a nested UI configuration within a parent Component .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(component_type:, name:, properties:, children: nil, events: nil, source_id: nil) ⇒ ComponentChildProperty

Returns a new instance of ComponentChildProperty.

Parameters:



988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
# File 'amplify_ui_builder/cfn_component.rb', line 988

def initialize(component_type:, name:, properties:, children: nil, events: nil, source_id: nil)
  @component_type = component_type
  Jsii::Type.check_type(@component_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "componentType")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @properties = properties
  Jsii::Type.check_type(@properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeXVpYnVpbGRlci5DZm5Db21wb25lbnQuQ29tcG9uZW50UHJvcGVydHlQcm9wZXJ0eSJ9XX19LCJraW5kIjoibWFwIn19XX19")), "properties")
  @children = children
  Jsii::Type.check_type(@children, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeXVpYnVpbGRlci5DZm5Db21wb25lbnQuQ29tcG9uZW50Q2hpbGRQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "children") unless @children.nil?
  @events = events
  Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeXVpYnVpbGRlci5DZm5Db21wb25lbnQuQ29tcG9uZW50RXZlbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoibWFwIn19XX19")), "events") unless @events.nil?
  @source_id = source_id
  Jsii::Type.check_type(@source_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourceId") unless @source_id.nil?
end

Instance Attribute Details

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

The list of ComponentChild instances for this component.



1024
1025
1026
# File 'amplify_ui_builder/cfn_component.rb', line 1024

def children
  @children
end

#component_typeString (readonly)

The type of the child component.



1007
1008
1009
# File 'amplify_ui_builder/cfn_component.rb', line 1007

def component_type
  @component_type
end

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

Describes the events that can be raised on the child component.

Use for the workflow feature in Amplify Studio that allows you to bind events and actions to components.



1031
1032
1033
# File 'amplify_ui_builder/cfn_component.rb', line 1031

def events
  @events
end

#nameString (readonly)

The name of the child component.



1012
1013
1014
# File 'amplify_ui_builder/cfn_component.rb', line 1012

def name
  @name
end

#propertiesAWSCDK::IResolvable, Hash{String => AWSCDK::IResolvable, AWSCDK::AmplifyUIBuilder::CfnComponent::ComponentPropertyProperty} (readonly)

Describes the properties of the child component.

You can't specify tags as a valid property for properties .



1019
1020
1021
# File 'amplify_ui_builder/cfn_component.rb', line 1019

def properties
  @properties
end

#source_idString? (readonly)

The unique ID of the child component in its original source system, such as Figma.



1036
1037
1038
# File 'amplify_ui_builder/cfn_component.rb', line 1036

def source_id
  @source_id
end

Class Method Details

.jsii_propertiesObject



1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
# File 'amplify_ui_builder/cfn_component.rb', line 1038

def self.jsii_properties
  {
    :component_type => "componentType",
    :name => "name",
    :properties => "properties",
    :children => "children",
    :events => "events",
    :source_id => "sourceId",
  }
end

Instance Method Details

#to_jsiiObject



1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
# File 'amplify_ui_builder/cfn_component.rb', line 1049

def to_jsii
  result = {}
  result.merge!({
    "componentType" => @component_type,
    "name" => @name,
    "properties" => @properties,
    "children" => @children,
    "events" => @events,
    "sourceId" => @source_id,
  })
  result.compact
end