Class: AWSCDK::IoTTwinMaker::CfnComponentType::DataTypeProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t_twin_maker/cfn_component_type.rb

Overview

An object that specifies the data type of a property.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, allowed_values: nil, nested_type: nil, relationship: nil, unit_of_measure: nil) ⇒ DataTypeProperty

Returns a new instance of DataTypeProperty.

Parameters:



775
776
777
778
779
780
781
782
783
784
785
786
# File 'io_t_twin_maker/cfn_component_type.rb', line 775

def initialize(type:, allowed_values: nil, nested_type: nil, relationship: nil, unit_of_measure: nil)
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type")
  @allowed_values = allowed_values
  Jsii::Type.check_type(@allowed_values, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaW90dHdpbm1ha2VyLkNmbkNvbXBvbmVudFR5cGUuRGF0YVZhbHVlUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "allowedValues") unless @allowed_values.nil?
  @nested_type = nested_type.is_a?(Hash) ? ::AWSCDK::IoTTwinMaker::CfnComponentType::DataTypeProperty.new(**nested_type.transform_keys(&:to_sym)) : nested_type
  Jsii::Type.check_type(@nested_type, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3R0d2lubWFrZXIuQ2ZuQ29tcG9uZW50VHlwZS5EYXRhVHlwZVByb3BlcnR5In1dfX0=")), "nestedType") unless @nested_type.nil?
  @relationship = relationship.is_a?(Hash) ? ::AWSCDK::IoTTwinMaker::CfnComponentType::RelationshipProperty.new(**relationship.transform_keys(&:to_sym)) : relationship
  Jsii::Type.check_type(@relationship, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3R0d2lubWFrZXIuQ2ZuQ29tcG9uZW50VHlwZS5SZWxhdGlvbnNoaXBQcm9wZXJ0eSJ9XX19")), "relationship") unless @relationship.nil?
  @unit_of_measure = unit_of_measure
  Jsii::Type.check_type(@unit_of_measure, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unitOfMeasure") unless @unit_of_measure.nil?
end

Instance Attribute Details

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

The allowed values for this data type.



799
800
801
# File 'io_t_twin_maker/cfn_component_type.rb', line 799

def allowed_values
  @allowed_values
end

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

The nested type in the data type.



804
805
806
# File 'io_t_twin_maker/cfn_component_type.rb', line 804

def nested_type
  @nested_type
end

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

A relationship that associates a component with another component.



809
810
811
# File 'io_t_twin_maker/cfn_component_type.rb', line 809

def relationship
  @relationship
end

#typeString (readonly)

The underlying type of the data type.

Valid Values: RELATIONSHIP | STRING | LONG | BOOLEAN | INTEGER | DOUBLE | LIST | MAP



794
795
796
# File 'io_t_twin_maker/cfn_component_type.rb', line 794

def type
  @type
end

#unit_of_measureString? (readonly)

The unit of measure used in this data type.



814
815
816
# File 'io_t_twin_maker/cfn_component_type.rb', line 814

def unit_of_measure
  @unit_of_measure
end

Class Method Details

.jsii_propertiesObject



816
817
818
819
820
821
822
823
824
# File 'io_t_twin_maker/cfn_component_type.rb', line 816

def self.jsii_properties
  {
    :type => "type",
    :allowed_values => "allowedValues",
    :nested_type => "nestedType",
    :relationship => "relationship",
    :unit_of_measure => "unitOfMeasure",
  }
end

Instance Method Details

#to_jsiiObject



826
827
828
829
830
831
832
833
834
835
836
# File 'io_t_twin_maker/cfn_component_type.rb', line 826

def to_jsii
  result = {}
  result.merge!({
    "type" => @type,
    "allowedValues" => @allowed_values,
    "nestedType" => @nested_type,
    "relationship" => @relationship,
    "unitOfMeasure" => @unit_of_measure,
  })
  result.compact
end