Class: AWSCDK::QuickSight::CfnAnalysis::MetricComparisonComputationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
quick_sight/cfn_analysis.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:



18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
# File 'quick_sight/cfn_analysis.rb', line 18830

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::CfnAnalysis::MeasureFieldProperty.new(**from_value.transform_keys(&:to_sym)) : from_value
  Jsii::Type.check_type(@from_value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkFuYWx5c2lzLk1lYXN1cmVGaWVsZFByb3BlcnR5In1dfX0=")), "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::CfnAnalysis::MeasureFieldProperty.new(**target_value.transform_keys(&:to_sym)) : target_value
  Jsii::Type.check_type(@target_value, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkFuYWx5c2lzLk1lYXN1cmVGaWVsZFByb3BlcnR5In1dfX0=")), "targetValue") unless @target_value.nil?
  @time = time.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnAnalysis::DimensionFieldProperty.new(**time.transform_keys(&:to_sym)) : time
  Jsii::Type.check_type(@time, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkFuYWx5c2lzLkRpbWVuc2lvbkZpZWxkUHJvcGVydHkifV19fQ==")), "time") unless @time.nil?
end

Instance Attribute Details

#computation_idString (readonly)

The ID for a computation.



18847
18848
18849
# File 'quick_sight/cfn_analysis.rb', line 18847

def computation_id
  @computation_id
end

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

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



18852
18853
18854
# File 'quick_sight/cfn_analysis.rb', line 18852

def from_value
  @from_value
end

#nameString? (readonly)

The name of a computation.



18857
18858
18859
# File 'quick_sight/cfn_analysis.rb', line 18857

def name
  @name
end

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

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



18862
18863
18864
# File 'quick_sight/cfn_analysis.rb', line 18862

def target_value
  @target_value
end

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

The time field that is used in a computation.



18867
18868
18869
# File 'quick_sight/cfn_analysis.rb', line 18867

def time
  @time
end

Class Method Details

.jsii_propertiesObject



18869
18870
18871
18872
18873
18874
18875
18876
18877
# File 'quick_sight/cfn_analysis.rb', line 18869

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

Instance Method Details

#to_jsiiObject



18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
# File 'quick_sight/cfn_analysis.rb', line 18879

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