Class: AWSCDK::IoT::CfnTopicRule::TimestampProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_topic_rule.rb

Overview

Describes how to interpret an application-defined timestamp value from an MQTT message payload and the precision of that value.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, unit: nil) ⇒ TimestampProperty

Returns a new instance of TimestampProperty.

Parameters:

  • value (String)

    An expression that returns a long epoch time value.

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

    The precision of the timestamp value that results from the expression described in value .



2850
2851
2852
2853
2854
2855
# File 'io_t/cfn_topic_rule.rb', line 2850

def initialize(value:, unit: nil)
  @value = value
  Jsii::Type.check_type(@value, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "value")
  @unit = unit
  Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") unless @unit.nil?
end

Instance Attribute Details

#unitString? (readonly)

The precision of the timestamp value that results from the expression described in value .



2866
2867
2868
# File 'io_t/cfn_topic_rule.rb', line 2866

def unit
  @unit
end

#valueString (readonly)

An expression that returns a long epoch time value.



2861
2862
2863
# File 'io_t/cfn_topic_rule.rb', line 2861

def value
  @value
end

Class Method Details

.jsii_propertiesObject



2868
2869
2870
2871
2872
2873
# File 'io_t/cfn_topic_rule.rb', line 2868

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

Instance Method Details

#to_jsiiObject



2875
2876
2877
2878
2879
2880
2881
2882
# File 'io_t/cfn_topic_rule.rb', line 2875

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