Class: AWSCDK::QuickSight::CfnTemplate::DataPathColorProperty

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

Overview

The color map that determines the color options for a particular element.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(color:, element:, time_granularity: nil) ⇒ DataPathColorProperty

Returns a new instance of DataPathColorProperty.

Parameters:



6389
6390
6391
6392
6393
6394
6395
6396
# File 'quick_sight/cfn_template.rb', line 6389

def initialize(color:, element:, time_granularity: nil)
  @color = color
  Jsii::Type.check_type(@color, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "color")
  @element = element.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::DataPathValueProperty.new(**element.transform_keys(&:to_sym)) : element
  Jsii::Type.check_type(@element, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLkRhdGFQYXRoVmFsdWVQcm9wZXJ0eSJ9XX19")), "element")
  @time_granularity = time_granularity
  Jsii::Type.check_type(@time_granularity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "timeGranularity") unless @time_granularity.nil?
end

Instance Attribute Details

#colorString (readonly)

The color that needs to be applied to the element.



6402
6403
6404
# File 'quick_sight/cfn_template.rb', line 6402

def color
  @color
end

#time_granularityString? (readonly)

The time granularity of the field that the color needs to be applied to.



6412
6413
6414
# File 'quick_sight/cfn_template.rb', line 6412

def time_granularity
  @time_granularity
end

Class Method Details

.jsii_propertiesObject



6414
6415
6416
6417
6418
6419
6420
# File 'quick_sight/cfn_template.rb', line 6414

def self.jsii_properties
  {
    :color => "color",
    :element => "element",
    :time_granularity => "timeGranularity",
  }
end

Instance Method Details

#to_jsiiObject



6422
6423
6424
6425
6426
6427
6428
6429
6430
# File 'quick_sight/cfn_template.rb', line 6422

def to_jsii
  result = {}
  result.merge!({
    "color" => @color,
    "element" => @element,
    "timeGranularity" => @time_granularity,
  })
  result.compact
end