Class: AWSCDK::IoTSiteWise::CfnAssetModel::PropertyTypeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_site_wise/cfn_asset_model.rb

Overview

Contains a property type, which can be one of attribute , measurement , metric , or transform .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_name:, attribute: nil, metric: nil, transform: nil) ⇒ PropertyTypeProperty

Returns a new instance of PropertyTypeProperty.

Parameters:



1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
# File 'io_t_site_wise/cfn_asset_model.rb', line 1303

def initialize(type_name:, attribute: nil, metric: nil, transform: nil)
  @type_name = type_name
  Jsii::Type.check_type(@type_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "typeName")
  @attribute = attribute.is_a?(Hash) ? ::AWSCDK::IoTSiteWise::CfnAssetModel::AttributeProperty.new(**attribute.transform_keys(&:to_sym)) : attribute
  Jsii::Type.check_type(@attribute, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RzaXRld2lzZS5DZm5Bc3NldE1vZGVsLkF0dHJpYnV0ZVByb3BlcnR5In1dfX0=")), "attribute") unless @attribute.nil?
  @metric = metric.is_a?(Hash) ? ::AWSCDK::IoTSiteWise::CfnAssetModel::MetricProperty.new(**metric.transform_keys(&:to_sym)) : metric
  Jsii::Type.check_type(@metric, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RzaXRld2lzZS5DZm5Bc3NldE1vZGVsLk1ldHJpY1Byb3BlcnR5In1dfX0=")), "metric") unless @metric.nil?
  @transform = transform.is_a?(Hash) ? ::AWSCDK::IoTSiteWise::CfnAssetModel::TransformProperty.new(**transform.transform_keys(&:to_sym)) : transform
  Jsii::Type.check_type(@transform, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3RzaXRld2lzZS5DZm5Bc3NldE1vZGVsLlRyYW5zZm9ybVByb3BlcnR5In1dfX0=")), "transform") unless @transform.nil?
end

Instance Attribute Details

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

Specifies an asset attribute property.

An attribute generally contains static information, such as the serial number of an IIoT wind turbine.



1325
1326
1327
# File 'io_t_site_wise/cfn_asset_model.rb', line 1325

def attribute
  @attribute
end

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

Specifies an asset metric property.

A metric contains a mathematical expression that uses aggregate functions to process all input data points over a time interval and output a single data point, such as to calculate the average hourly temperature.



1332
1333
1334
# File 'io_t_site_wise/cfn_asset_model.rb', line 1332

def metric
  @metric
end

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

Specifies an asset transform property.

A transform contains a mathematical expression that maps a property's data points from one form to another, such as a unit conversion from Celsius to Fahrenheit.



1339
1340
1341
# File 'io_t_site_wise/cfn_asset_model.rb', line 1339

def transform
  @transform
end

#type_nameString (readonly)

The type of property type, which can be one of Attribute , Measurement , Metric , or Transform .



1318
1319
1320
# File 'io_t_site_wise/cfn_asset_model.rb', line 1318

def type_name
  @type_name
end

Class Method Details

.jsii_propertiesObject



1341
1342
1343
1344
1345
1346
1347
1348
# File 'io_t_site_wise/cfn_asset_model.rb', line 1341

def self.jsii_properties
  {
    :type_name => "typeName",
    :attribute => "attribute",
    :metric => "metric",
    :transform => "transform",
  }
end

Instance Method Details

#to_jsiiObject



1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'io_t_site_wise/cfn_asset_model.rb', line 1350

def to_jsii
  result = {}
  result.merge!({
    "typeName" => @type_name,
    "attribute" => @attribute,
    "metric" => @metric,
    "transform" => @transform,
  })
  result.compact
end