Class: AWSCDK::IoTEvents::CfnDetectorModel::AssetPropertyVariantProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoTEvents::CfnDetectorModel::AssetPropertyVariantProperty
- Defined in:
- io_t_events/cfn_detector_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_valueparameter 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
-
#boolean_value ⇒ String?
readonly
The asset property value is a Boolean value that must be
'TRUE'or'FALSE'. -
#double_value ⇒ String?
readonly
The asset property value is a double.
-
#integer_value ⇒ String?
readonly
The asset property value is an integer.
-
#string_value ⇒ String?
readonly
The asset property value is a string.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(boolean_value: nil, double_value: nil, integer_value: nil, string_value: nil) ⇒ AssetPropertyVariantProperty
constructor
A new instance of AssetPropertyVariantProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(boolean_value: nil, double_value: nil, integer_value: nil, string_value: nil) ⇒ AssetPropertyVariantProperty
Returns a new instance of AssetPropertyVariantProperty.
913 914 915 916 917 918 919 920 921 922 |
# File 'io_t_events/cfn_detector_model.rb', line 913 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_value ⇒ String? (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.
930 931 932 |
# File 'io_t_events/cfn_detector_model.rb', line 930 def boolean_value @boolean_value end |
#double_value ⇒ String? (readonly)
The asset property value is a double.
You must use an expression, and the evaluated result should be a double.
937 938 939 |
# File 'io_t_events/cfn_detector_model.rb', line 937 def double_value @double_value end |
#integer_value ⇒ String? (readonly)
The asset property value is an integer.
You must use an expression, and the evaluated result should be an integer.
944 945 946 |
# File 'io_t_events/cfn_detector_model.rb', line 944 def integer_value @integer_value end |
#string_value ⇒ String? (readonly)
The asset property value is a string.
You must use an expression, and the evaluated result should be a string.
951 952 953 |
# File 'io_t_events/cfn_detector_model.rb', line 951 def string_value @string_value end |
Class Method Details
.jsii_properties ⇒ Object
953 954 955 956 957 958 959 960 |
# File 'io_t_events/cfn_detector_model.rb', line 953 def self.jsii_properties { :boolean_value => "booleanValue", :double_value => "doubleValue", :integer_value => "integerValue", :string_value => "stringValue", } end |
Instance Method Details
#to_jsii ⇒ Object
962 963 964 965 966 967 968 969 970 971 |
# File 'io_t_events/cfn_detector_model.rb', line 962 def to_jsii result = {} result.merge!({ "booleanValue" => @boolean_value, "doubleValue" => @double_value, "integerValue" => @integer_value, "stringValue" => @string_value, }) result.compact end |