Class: AWSCDK::IoTEvents::CfnAlarmModel::AssetPropertyVariantProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_events/cfn_alarm_model.rb

Overview

A structure that contains an asset property value.

For more information, see Variant in the AWS IoT SiteWise API Reference .

You must use expressions for all parameters in AssetPropertyVariant . The expressions accept literals, operators, functions, references, and substitution templates.

Examples - For literal values, the expressions must contain single quotes. For example, the value for the integer_value parameter can be '100' .

  • For references, you must specify either variables or parameters. For example, the value for the boolean_value parameter can be $variable.offline .
  • For a substitution template, you must use ${} , and the template must be in single quotes. A substitution template can also contain a combination of literals, operators, functions, references, and substitution templates.

In the following example, the value for the double_value parameter uses a substitution template.

'${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}'

For more information, see Expressions in the AWS IoT Events Developer Guide .

You must specify one of the following value types, depending on the data_type of the specified asset property. For more information, see AssetProperty in the AWS IoT SiteWise API Reference .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(boolean_value: nil, double_value: nil, integer_value: nil, string_value: nil) ⇒ AssetPropertyVariantProperty

Returns a new instance of AssetPropertyVariantProperty.

Parameters:

  • boolean_value (String, nil) (defaults to: nil)

    The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' .

  • double_value (String, nil) (defaults to: nil)

    The asset property value is a double.

  • integer_value (String, nil) (defaults to: nil)

    The asset property value is an integer.

  • string_value (String, nil) (defaults to: nil)

    The asset property value is a string.



1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
# File 'io_t_events/cfn_alarm_model.rb', line 1096

def initialize(boolean_value: nil, double_value: nil, integer_value: nil, string_value: nil)
  @boolean_value = boolean_value
  Jsii::Type.check_type(@boolean_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "booleanValue") unless @boolean_value.nil?
  @double_value = double_value
  Jsii::Type.check_type(@double_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "doubleValue") unless @double_value.nil?
  @integer_value = integer_value
  Jsii::Type.check_type(@integer_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "integerValue") unless @integer_value.nil?
  @string_value = string_value
  Jsii::Type.check_type(@string_value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "stringValue") unless @string_value.nil?
end

Instance Attribute Details

#boolean_valueString? (readonly)

The asset property value is a Boolean value that must be 'TRUE' or 'FALSE' .

You must use an expression, and the evaluated result should be a Boolean value.



1113
1114
1115
# File 'io_t_events/cfn_alarm_model.rb', line 1113

def boolean_value
  @boolean_value
end

#double_valueString? (readonly)

The asset property value is a double.

You must use an expression, and the evaluated result should be a double.



1120
1121
1122
# File 'io_t_events/cfn_alarm_model.rb', line 1120

def double_value
  @double_value
end

#integer_valueString? (readonly)

The asset property value is an integer.

You must use an expression, and the evaluated result should be an integer.



1127
1128
1129
# File 'io_t_events/cfn_alarm_model.rb', line 1127

def integer_value
  @integer_value
end

#string_valueString? (readonly)

The asset property value is a string.

You must use an expression, and the evaluated result should be a string.



1134
1135
1136
# File 'io_t_events/cfn_alarm_model.rb', line 1134

def string_value
  @string_value
end

Class Method Details

.jsii_propertiesObject



1136
1137
1138
1139
1140
1141
1142
1143
# File 'io_t_events/cfn_alarm_model.rb', line 1136

def self.jsii_properties
  {
    :boolean_value => "booleanValue",
    :double_value => "doubleValue",
    :integer_value => "integerValue",
    :string_value => "stringValue",
  }
end

Instance Method Details

#to_jsiiObject



1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
# File 'io_t_events/cfn_alarm_model.rb', line 1145

def to_jsii
  result = {}
  result.merge!({
    "booleanValue" => @boolean_value,
    "doubleValue" => @double_value,
    "integerValue" => @integer_value,
    "stringValue" => @string_value,
  })
  result.compact
end