Class: AWSCDK::QuickSight::CfnTopic::NamedEntityDefinitionProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
quick_sight/cfn_topic.rb

Overview

A structure that represents a named entity.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(field_name: nil, metric: nil, property_name: nil, property_role: nil, property_usage: nil) ⇒ NamedEntityDefinitionProperty

Returns a new instance of NamedEntityDefinitionProperty.

Parameters:

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

    The name of the entity.

  • metric (AWSCDK::IResolvable, AWSCDK::QuickSight::CfnTopic::NamedEntityDefinitionMetricProperty, nil) (defaults to: nil)

    The definition of a metric.

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

    The property name to be used for the named entity.

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

    The property role.

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

    The property usage.



1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
# File 'quick_sight/cfn_topic.rb', line 1180

def initialize(field_name: nil, metric: nil, property_name: nil, property_role: nil, property_usage: nil)
  @field_name = field_name
  Jsii::Type.check_type(@field_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fieldName") unless @field_name.nil?
  @metric = metric.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTopic::NamedEntityDefinitionMetricProperty.new(**metric.transform_keys(&:to_sym)) : metric
  Jsii::Type.check_type(@metric, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRvcGljLk5hbWVkRW50aXR5RGVmaW5pdGlvbk1ldHJpY1Byb3BlcnR5In1dfX0=")), "metric") unless @metric.nil?
  @property_name = property_name
  Jsii::Type.check_type(@property_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyName") unless @property_name.nil?
  @property_role = property_role
  Jsii::Type.check_type(@property_role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyRole") unless @property_role.nil?
  @property_usage = property_usage
  Jsii::Type.check_type(@property_usage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "propertyUsage") unless @property_usage.nil?
end

Instance Attribute Details

#field_nameString? (readonly)

The name of the entity.



1197
1198
1199
# File 'quick_sight/cfn_topic.rb', line 1197

def field_name
  @field_name
end

#property_nameString? (readonly)

The property name to be used for the named entity.



1207
1208
1209
# File 'quick_sight/cfn_topic.rb', line 1207

def property_name
  @property_name
end

#property_roleString? (readonly)

The property role.

Valid values for this structure are PRIMARY and ID .



1214
1215
1216
# File 'quick_sight/cfn_topic.rb', line 1214

def property_role
  @property_role
end

#property_usageString? (readonly)

The property usage.

Valid values for this structure are INHERIT , DIMENSION , and MEASURE .



1221
1222
1223
# File 'quick_sight/cfn_topic.rb', line 1221

def property_usage
  @property_usage
end

Class Method Details

.jsii_propertiesObject



1223
1224
1225
1226
1227
1228
1229
1230
1231
# File 'quick_sight/cfn_topic.rb', line 1223

def self.jsii_properties
  {
    :field_name => "fieldName",
    :metric => "metric",
    :property_name => "propertyName",
    :property_role => "propertyRole",
    :property_usage => "propertyUsage",
  }
end

Instance Method Details

#to_jsiiObject



1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'quick_sight/cfn_topic.rb', line 1233

def to_jsii
  result = {}
  result.merge!({
    "fieldName" => @field_name,
    "metric" => @metric,
    "propertyName" => @property_name,
    "propertyRole" => @property_role,
    "propertyUsage" => @property_usage,
  })
  result.compact
end