Class: AWSCDK::AmplifyUIBuilder::CfnFormProps

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

Overview

Properties for defining a CfnForm.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_id: nil, cta: nil, data_type: nil, environment_name: nil, fields: nil, form_action_type: nil, label_decorator: nil, name: nil, schema_version: nil, sectional_elements: nil, style: nil, tags: nil) ⇒ CfnFormProps

Returns a new instance of CfnFormProps.

Parameters:



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'amplify_ui_builder/cfn_form_props.rb', line 21

def initialize(app_id: nil, cta: nil, data_type: nil, environment_name: nil, fields: nil, form_action_type: nil, label_decorator: nil, name: nil, schema_version: nil, sectional_elements: nil, style: nil, tags: nil)
  @app_id = app_id
  Jsii::Type.check_type(@app_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "appId") unless @app_id.nil?
  @cta = cta.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnForm::FormCTAProperty.new(**cta.transform_keys(&:to_sym)) : cta
  Jsii::Type.check_type(@cta, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkZvcm0uRm9ybUNUQVByb3BlcnR5In1dfX0=")), "cta") unless @cta.nil?
  @data_type = data_type.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnForm::FormDataTypeConfigProperty.new(**data_type.transform_keys(&:to_sym)) : data_type
  Jsii::Type.check_type(@data_type, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkZvcm0uRm9ybURhdGFUeXBlQ29uZmlnUHJvcGVydHkifV19fQ==")), "dataType") unless @data_type.nil?
  @environment_name = environment_name
  Jsii::Type.check_type(@environment_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "environmentName") unless @environment_name.nil?
  @fields = fields
  Jsii::Type.check_type(@fields, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeXVpYnVpbGRlci5DZm5Gb3JtLkZpZWxkQ29uZmlnUHJvcGVydHkifV19fSwia2luZCI6Im1hcCJ9fV19fQ==")), "fields") unless @fields.nil?
  @form_action_type = form_action_type
  Jsii::Type.check_type(@form_action_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "formActionType") unless @form_action_type.nil?
  @label_decorator = label_decorator
  Jsii::Type.check_type(@label_decorator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "labelDecorator") unless @label_decorator.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @schema_version = schema_version
  Jsii::Type.check_type(@schema_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schemaVersion") unless @schema_version.nil?
  @sectional_elements = sectional_elements
  Jsii::Type.check_type(@sectional_elements, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYW1wbGlmeXVpYnVpbGRlci5DZm5Gb3JtLlNlY3Rpb25hbEVsZW1lbnRQcm9wZXJ0eSJ9XX19LCJraW5kIjoibWFwIn19XX19")), "sectionalElements") unless @sectional_elements.nil?
  @style = style.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnForm::FormStyleProperty.new(**style.transform_keys(&:to_sym)) : style
  Jsii::Type.check_type(@style, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkZvcm0uRm9ybVN0eWxlUHJvcGVydHkifV19fQ==")), "style") unless @style.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "tags") unless @tags.nil?
end

Instance Attribute Details

#app_idString? (readonly)

The unique ID of the Amplify app associated with the form.



52
53
54
# File 'amplify_ui_builder/cfn_form_props.rb', line 52

def app_id
  @app_id
end

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

The FormCTA object that stores the call to action configuration for the form.



57
58
59
# File 'amplify_ui_builder/cfn_form_props.rb', line 57

def cta
  @cta
end

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

The type of data source to use to create the form.



62
63
64
# File 'amplify_ui_builder/cfn_form_props.rb', line 62

def data_type
  @data_type
end

#environment_nameString? (readonly)

The name of the backend environment that is a part of the Amplify app.



67
68
69
# File 'amplify_ui_builder/cfn_form_props.rb', line 67

def environment_name
  @environment_name
end

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

The configuration information for the form's fields.



72
73
74
# File 'amplify_ui_builder/cfn_form_props.rb', line 72

def fields
  @fields
end

#form_action_typeString? (readonly)

Specifies whether to perform a create or update action on the form.



77
78
79
# File 'amplify_ui_builder/cfn_form_props.rb', line 77

def form_action_type
  @form_action_type
end

#label_decoratorString? (readonly)

Specifies an icon or decoration to display on the form.



82
83
84
# File 'amplify_ui_builder/cfn_form_props.rb', line 82

def label_decorator
  @label_decorator
end

#nameString? (readonly)

The name of the form.



87
88
89
# File 'amplify_ui_builder/cfn_form_props.rb', line 87

def name
  @name
end

#schema_versionString? (readonly)

The schema version of the form.



92
93
94
# File 'amplify_ui_builder/cfn_form_props.rb', line 92

def schema_version
  @schema_version
end

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

The configuration information for the visual helper elements for the form.

These elements are not associated with any data.



99
100
101
# File 'amplify_ui_builder/cfn_form_props.rb', line 99

def sectional_elements
  @sectional_elements
end

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

The configuration for the form's style.



104
105
106
# File 'amplify_ui_builder/cfn_form_props.rb', line 104

def style
  @style
end

#tagsHash{String => String}? (readonly)

One or more key-value pairs to use when tagging the form data.



109
110
111
# File 'amplify_ui_builder/cfn_form_props.rb', line 109

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'amplify_ui_builder/cfn_form_props.rb', line 111

def self.jsii_properties
  {
    :app_id => "appId",
    :cta => "cta",
    :data_type => "dataType",
    :environment_name => "environmentName",
    :fields => "fields",
    :form_action_type => "formActionType",
    :label_decorator => "labelDecorator",
    :name => "name",
    :schema_version => "schemaVersion",
    :sectional_elements => "sectionalElements",
    :style => "style",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# File 'amplify_ui_builder/cfn_form_props.rb', line 128

def to_jsii
  result = {}
  result.merge!({
    "appId" => @app_id,
    "cta" => @cta,
    "dataType" => @data_type,
    "environmentName" => @environment_name,
    "fields" => @fields,
    "formActionType" => @form_action_type,
    "labelDecorator" => @label_decorator,
    "name" => @name,
    "schemaVersion" => @schema_version,
    "sectionalElements" => @sectional_elements,
    "style" => @style,
    "tags" => @tags,
  })
  result.compact
end