Class: AWSCDK::IoTEvents::CfnDetectorModel::AssetPropertyValueProperty

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

Overview

A structure that contains value information. For more information, see AssetPropertyValue in the AWS IoT SiteWise API Reference .

You must use expressions for all parameters in AssetPropertyValue . 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 quality parameter can be 'GOOD' .

  • For references, you must specify either variables or input values. For example, the value for the quality parameter can be $input.TemperatureInput.sensorData.quality .

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, quality: nil, timestamp: nil) ⇒ AssetPropertyValueProperty

Returns a new instance of AssetPropertyValueProperty.

Parameters:



838
839
840
841
842
843
844
845
# File 'io_t_events/cfn_detector_model.rb', line 838

def initialize(value:, quality: nil, timestamp: nil)
  @value = value.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::AssetPropertyVariantProperty.new(**value.transform_keys(&:to_sym)) : value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5Bc3NldFByb3BlcnR5VmFyaWFudFByb3BlcnR5In1dfX0=")), "value")
  @quality = quality
  Jsii::Type.check_type(@quality, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "quality") unless @quality.nil?
  @timestamp = timestamp.is_a?(Hash) ? ::AWSCDK::IoTEvents::CfnDetectorModel::AssetPropertyTimestampProperty.new(**timestamp.transform_keys(&:to_sym)) : timestamp
  Jsii::Type.check_type(@timestamp, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RldmVudHMuQ2ZuRGV0ZWN0b3JNb2RlbC5Bc3NldFByb3BlcnR5VGltZXN0YW1wUHJvcGVydHkifV19fQ==")), "timestamp") unless @timestamp.nil?
end

Instance Attribute Details

#qualityString? (readonly)

The quality of the asset property value.

The value must be 'GOOD' , 'BAD' , or 'UNCERTAIN' .



858
859
860
# File 'io_t_events/cfn_detector_model.rb', line 858

def quality
  @quality
end

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

The timestamp associated with the asset property value.

The default is the current event time.



865
866
867
# File 'io_t_events/cfn_detector_model.rb', line 865

def timestamp
  @timestamp
end

Class Method Details

.jsii_propertiesObject



867
868
869
870
871
872
873
# File 'io_t_events/cfn_detector_model.rb', line 867

def self.jsii_properties
  {
    :value => "value",
    :quality => "quality",
    :timestamp => "timestamp",
  }
end

Instance Method Details

#to_jsiiObject



875
876
877
878
879
880
881
882
883
# File 'io_t_events/cfn_detector_model.rb', line 875

def to_jsii
  result = {}
  result.merge!({
    "value" => @value,
    "quality" => @quality,
    "timestamp" => @timestamp,
  })
  result.compact
end