Class: AWSCDK::AmplifyUIBuilder::CfnComponent::ComponentConditionPropertyProperty

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

Overview

The ComponentConditionProperty property specifies a conditional expression for setting a component property.

Use ComponentConditionProperty to set a property to different values conditionally, based on the value of another property.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_else: nil, field: nil, operand: nil, operand_type: nil, operator: nil, property: nil, _then: nil) ⇒ ComponentConditionPropertyProperty

Returns a new instance of ComponentConditionPropertyProperty.

Parameters:



1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
# File 'amplify_ui_builder/cfn_component.rb', line 1078

def initialize(_else: nil, field: nil, operand: nil, operand_type: nil, operator: nil, property: nil, _then: nil)
  @_else = _else.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnComponent::ComponentPropertyProperty.new(**_else.transform_keys(&:to_sym)) : _else
  Jsii::Type.check_type(@_else, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkNvbXBvbmVudC5Db21wb25lbnRQcm9wZXJ0eVByb3BlcnR5In1dfX0=")), "else") unless @_else.nil?
  @field = field
  Jsii::Type.check_type(@field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "field") unless @field.nil?
  @operand = operand
  Jsii::Type.check_type(@operand, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operand") unless @operand.nil?
  @operand_type = operand_type
  Jsii::Type.check_type(@operand_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operandType") unless @operand_type.nil?
  @operator = operator
  Jsii::Type.check_type(@operator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "operator") unless @operator.nil?
  @property = property
  Jsii::Type.check_type(@property, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "property") unless @property.nil?
  @_then = _then.is_a?(Hash) ? ::AWSCDK::AmplifyUIBuilder::CfnComponent::ComponentPropertyProperty.new(**_then.transform_keys(&:to_sym)) : _then
  Jsii::Type.check_type(@_then, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hbXBsaWZ5dWlidWlsZGVyLkNmbkNvbXBvbmVudC5Db21wb25lbnRQcm9wZXJ0eVByb3BlcnR5In1dfX0=")), "then") unless @_then.nil?
end

Instance Attribute Details

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

The value to assign to the property if the condition is not met.



1099
1100
1101
# File 'amplify_ui_builder/cfn_component.rb', line 1099

def _else
  @_else
end

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

The value to assign to the property if the condition is met.



1131
1132
1133
# File 'amplify_ui_builder/cfn_component.rb', line 1131

def _then
  @_then
end

#fieldString? (readonly)

The name of a field.

Specify this when the property is a data model.



1106
1107
1108
# File 'amplify_ui_builder/cfn_component.rb', line 1106

def field
  @field
end

#operandString? (readonly)

The value of the property to evaluate.



1111
1112
1113
# File 'amplify_ui_builder/cfn_component.rb', line 1111

def operand
  @operand
end

#operand_typeString? (readonly)

The type of the property to evaluate.



1116
1117
1118
# File 'amplify_ui_builder/cfn_component.rb', line 1116

def operand_type
  @operand_type
end

#operatorString? (readonly)

The operator to use to perform the evaluation, such as eq to represent equals.



1121
1122
1123
# File 'amplify_ui_builder/cfn_component.rb', line 1121

def operator
  @operator
end

#propertyString? (readonly)

The name of the conditional property.



1126
1127
1128
# File 'amplify_ui_builder/cfn_component.rb', line 1126

def property
  @property
end

Class Method Details

.jsii_propertiesObject



1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
# File 'amplify_ui_builder/cfn_component.rb', line 1133

def self.jsii_properties
  {
    :_else => "else",
    :field => "field",
    :operand => "operand",
    :operand_type => "operandType",
    :operator => "operator",
    :property => "property",
    :_then => "then",
  }
end

Instance Method Details

#to_jsiiObject



1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
# File 'amplify_ui_builder/cfn_component.rb', line 1145

def to_jsii
  result = {}
  result.merge!({
    "else" => @_else,
    "field" => @field,
    "operand" => @operand,
    "operandType" => @operand_type,
    "operator" => @operator,
    "property" => @property,
    "then" => @_then,
  })
  result.compact
end