Class: AWSCDK::QuickSight::CfnDashboard::MetricComparisonComputationProperty

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

Overview

The metric comparison computation configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(computation_id:, from_value: nil, name: nil, target_value: nil, time: nil) ⇒ MetricComparisonComputationProperty

Returns a new instance of MetricComparisonComputationProperty.

Parameters:



19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
# File 'quick_sight/cfn_dashboard.rb', line 19802

def initialize(computation_id:, from_value: nil, name: nil, target_value: nil, time: nil)
  @computation_id = computation_id
  Jsii::Type.check_type(@computation_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "computationId")
  @from_value = from_value.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnDashboard::MeasureFieldProperty.new(**from_value.transform_keys(&:to_sym)) : from_value
  Jsii::Type.check_type(@from_value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkRhc2hib2FyZC5NZWFzdXJlRmllbGRQcm9wZXJ0eSJ9XX19")), "fromValue") unless @from_value.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @target_value = target_value.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnDashboard::MeasureFieldProperty.new(**target_value.transform_keys(&:to_sym)) : target_value
  Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkRhc2hib2FyZC5NZWFzdXJlRmllbGRQcm9wZXJ0eSJ9XX19")), "targetValue") unless @target_value.nil?
  @time = time.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnDashboard::DimensionFieldProperty.new(**time.transform_keys(&:to_sym)) : time
  Jsii::Type.check_type(@time, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkRhc2hib2FyZC5EaW1lbnNpb25GaWVsZFByb3BlcnR5In1dfX0=")), "time") unless @time.nil?
end

Instance Attribute Details

#computation_idString (readonly)

The ID for a computation.



19819
19820
19821
# File 'quick_sight/cfn_dashboard.rb', line 19819

def computation_id
  @computation_id
end

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

The field that is used in a metric comparison from value setup.



19824
19825
19826
# File 'quick_sight/cfn_dashboard.rb', line 19824

def from_value
  @from_value
end

#nameString? (readonly)

The name of a computation.



19829
19830
19831
# File 'quick_sight/cfn_dashboard.rb', line 19829

def name
  @name
end

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

The field that is used in a metric comparison to value setup.



19834
19835
19836
# File 'quick_sight/cfn_dashboard.rb', line 19834

def target_value
  @target_value
end

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

The time field that is used in a computation.



19839
19840
19841
# File 'quick_sight/cfn_dashboard.rb', line 19839

def time
  @time
end

Class Method Details

.jsii_propertiesObject



19841
19842
19843
19844
19845
19846
19847
19848
19849
# File 'quick_sight/cfn_dashboard.rb', line 19841

def self.jsii_properties
  {
    :computation_id => "computationId",
    :from_value => "fromValue",
    :name => "name",
    :target_value => "targetValue",
    :time => "time",
  }
end

Instance Method Details

#to_jsiiObject



19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
# File 'quick_sight/cfn_dashboard.rb', line 19851

def to_jsii
  result = {}
  result.merge!({
    "computationId" => @computation_id,
    "fromValue" => @from_value,
    "name" => @name,
    "targetValue" => @target_value,
    "time" => @time,
  })
  result.compact
end