Class: AWSCDK::QuickSight::CfnTemplate::ComputationProperty

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

Overview

The computation union that is used in an insight visual.

This is a union type structure. For this structure to be valid, only one of the attributes can be defined.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(forecast: nil, growth_rate: nil, maximum_minimum: nil, metric_comparison: nil, period_over_period: nil, period_to_date: nil, top_bottom_movers: nil, top_bottom_ranked: nil, total_aggregation: nil, unique_values: nil) ⇒ ComputationProperty

Returns a new instance of ComputationProperty.

Parameters:



4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
# File 'quick_sight/cfn_template.rb', line 4709

def initialize(forecast: nil, growth_rate: nil, maximum_minimum: nil, metric_comparison: nil, period_over_period: nil, period_to_date: nil, top_bottom_movers: nil, top_bottom_ranked: nil, total_aggregation: nil, unique_values: nil)
  @forecast = forecast.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::ForecastComputationProperty.new(**forecast.transform_keys(&:to_sym)) : forecast
  Jsii::Type.check_type(@forecast, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLkZvcmVjYXN0Q29tcHV0YXRpb25Qcm9wZXJ0eSJ9XX19")), "forecast") unless @forecast.nil?
  @growth_rate = growth_rate.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::GrowthRateComputationProperty.new(**growth_rate.transform_keys(&:to_sym)) : growth_rate
  Jsii::Type.check_type(@growth_rate, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLkdyb3d0aFJhdGVDb21wdXRhdGlvblByb3BlcnR5In1dfX0=")), "growthRate") unless @growth_rate.nil?
  @maximum_minimum = maximum_minimum.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::MaximumMinimumComputationProperty.new(**maximum_minimum.transform_keys(&:to_sym)) : maximum_minimum
  Jsii::Type.check_type(@maximum_minimum, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLk1heGltdW1NaW5pbXVtQ29tcHV0YXRpb25Qcm9wZXJ0eSJ9XX19")), "maximumMinimum") unless @maximum_minimum.nil?
  @metric_comparison = metric_comparison.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::MetricComparisonComputationProperty.new(**metric_comparison.transform_keys(&:to_sym)) : metric_comparison
  Jsii::Type.check_type(@metric_comparison, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLk1ldHJpY0NvbXBhcmlzb25Db21wdXRhdGlvblByb3BlcnR5In1dfX0=")), "metricComparison") unless @metric_comparison.nil?
  @period_over_period = period_over_period.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::PeriodOverPeriodComputationProperty.new(**period_over_period.transform_keys(&:to_sym)) : period_over_period
  Jsii::Type.check_type(@period_over_period, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLlBlcmlvZE92ZXJQZXJpb2RDb21wdXRhdGlvblByb3BlcnR5In1dfX0=")), "periodOverPeriod") unless @period_over_period.nil?
  @period_to_date = period_to_date.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::PeriodToDateComputationProperty.new(**period_to_date.transform_keys(&:to_sym)) : period_to_date
  Jsii::Type.check_type(@period_to_date, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLlBlcmlvZFRvRGF0ZUNvbXB1dGF0aW9uUHJvcGVydHkifV19fQ==")), "periodToDate") unless @period_to_date.nil?
  @top_bottom_movers = top_bottom_movers.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::TopBottomMoversComputationProperty.new(**top_bottom_movers.transform_keys(&:to_sym)) : top_bottom_movers
  Jsii::Type.check_type(@top_bottom_movers, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLlRvcEJvdHRvbU1vdmVyc0NvbXB1dGF0aW9uUHJvcGVydHkifV19fQ==")), "topBottomMovers") unless @top_bottom_movers.nil?
  @top_bottom_ranked = top_bottom_ranked.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::TopBottomRankedComputationProperty.new(**top_bottom_ranked.transform_keys(&:to_sym)) : top_bottom_ranked
  Jsii::Type.check_type(@top_bottom_ranked, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLlRvcEJvdHRvbVJhbmtlZENvbXB1dGF0aW9uUHJvcGVydHkifV19fQ==")), "topBottomRanked") unless @top_bottom_ranked.nil?
  @total_aggregation = total_aggregation.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::TotalAggregationComputationProperty.new(**total_aggregation.transform_keys(&:to_sym)) : total_aggregation
  Jsii::Type.check_type(@total_aggregation, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLlRvdGFsQWdncmVnYXRpb25Db21wdXRhdGlvblByb3BlcnR5In1dfX0=")), "totalAggregation") unless @total_aggregation.nil?
  @unique_values = unique_values.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnTemplate::UniqueValuesComputationProperty.new(**unique_values.transform_keys(&:to_sym)) : unique_values
  Jsii::Type.check_type(@unique_values, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLlVuaXF1ZVZhbHVlc0NvbXB1dGF0aW9uUHJvcGVydHkifV19fQ==")), "uniqueValues") unless @unique_values.nil?
end

Instance Attribute Details

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

The forecast computation configuration.



4736
4737
4738
# File 'quick_sight/cfn_template.rb', line 4736

def forecast
  @forecast
end

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

The growth rate computation configuration.



4741
4742
4743
# File 'quick_sight/cfn_template.rb', line 4741

def growth_rate
  @growth_rate
end

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

The maximum and minimum computation configuration.



4746
4747
4748
# File 'quick_sight/cfn_template.rb', line 4746

def maximum_minimum
  @maximum_minimum
end

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

The metric comparison computation configuration.



4751
4752
4753
# File 'quick_sight/cfn_template.rb', line 4751

def metric_comparison
  @metric_comparison
end

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

The period over period computation configuration.



4756
4757
4758
# File 'quick_sight/cfn_template.rb', line 4756

def period_over_period
  @period_over_period
end

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

The period to DataSetIdentifier computation configuration.



4761
4762
4763
# File 'quick_sight/cfn_template.rb', line 4761

def period_to_date
  @period_to_date
end

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

The top movers and bottom movers computation configuration.



4766
4767
4768
# File 'quick_sight/cfn_template.rb', line 4766

def top_bottom_movers
  @top_bottom_movers
end

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

The top ranked and bottom ranked computation configuration.



4771
4772
4773
# File 'quick_sight/cfn_template.rb', line 4771

def top_bottom_ranked
  @top_bottom_ranked
end

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

The total aggregation computation configuration.



4776
4777
4778
# File 'quick_sight/cfn_template.rb', line 4776

def total_aggregation
  @total_aggregation
end

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

The unique values computation configuration.



4781
4782
4783
# File 'quick_sight/cfn_template.rb', line 4781

def unique_values
  @unique_values
end

Class Method Details

.jsii_propertiesObject



4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
# File 'quick_sight/cfn_template.rb', line 4783

def self.jsii_properties
  {
    :forecast => "forecast",
    :growth_rate => "growthRate",
    :maximum_minimum => "maximumMinimum",
    :metric_comparison => "metricComparison",
    :period_over_period => "periodOverPeriod",
    :period_to_date => "periodToDate",
    :top_bottom_movers => "topBottomMovers",
    :top_bottom_ranked => "topBottomRanked",
    :total_aggregation => "totalAggregation",
    :unique_values => "uniqueValues",
  }
end

Instance Method Details

#to_jsiiObject



4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
# File 'quick_sight/cfn_template.rb', line 4798

def to_jsii
  result = {}
  result.merge!({
    "forecast" => @forecast,
    "growthRate" => @growth_rate,
    "maximumMinimum" => @maximum_minimum,
    "metricComparison" => @metric_comparison,
    "periodOverPeriod" => @period_over_period,
    "periodToDate" => @period_to_date,
    "topBottomMovers" => @top_bottom_movers,
    "topBottomRanked" => @top_bottom_ranked,
    "totalAggregation" => @total_aggregation,
    "uniqueValues" => @unique_values,
  })
  result.compact
end