Class: AWSCDK::QuickSight::CfnAnalysis::AggregationFunctionProperty

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

Overview

An aggregation function aggregates values from a dimension or measure.

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(attribute_aggregation_function: nil, categorical_aggregation_function: nil, date_aggregation_function: nil, numerical_aggregation_function: nil) ⇒ AggregationFunctionProperty

Returns a new instance of AggregationFunctionProperty.

Parameters:



727
728
729
730
731
732
733
734
735
736
# File 'quick_sight/cfn_analysis.rb', line 727

def initialize(attribute_aggregation_function: nil, categorical_aggregation_function: nil, date_aggregation_function: nil, numerical_aggregation_function: nil)
  @attribute_aggregation_function = attribute_aggregation_function.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnAnalysis::AttributeAggregationFunctionProperty.new(**attribute_aggregation_function.transform_keys(&:to_sym)) : attribute_aggregation_function
  Jsii::Type.check_type(@attribute_aggregation_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkFuYWx5c2lzLkF0dHJpYnV0ZUFnZ3JlZ2F0aW9uRnVuY3Rpb25Qcm9wZXJ0eSJ9XX19")), "attributeAggregationFunction") unless @attribute_aggregation_function.nil?
  @categorical_aggregation_function = categorical_aggregation_function
  Jsii::Type.check_type(@categorical_aggregation_function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "categoricalAggregationFunction") unless @categorical_aggregation_function.nil?
  @date_aggregation_function = date_aggregation_function
  Jsii::Type.check_type(@date_aggregation_function, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dateAggregationFunction") unless @date_aggregation_function.nil?
  @numerical_aggregation_function = numerical_aggregation_function.is_a?(Hash) ? ::AWSCDK::QuickSight::CfnAnalysis::NumericalAggregationFunctionProperty.new(**numerical_aggregation_function.transform_keys(&:to_sym)) : numerical_aggregation_function
  Jsii::Type.check_type(@numerical_aggregation_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmbkFuYWx5c2lzLk51bWVyaWNhbEFnZ3JlZ2F0aW9uRnVuY3Rpb25Qcm9wZXJ0eSJ9XX19")), "numericalAggregationFunction") unless @numerical_aggregation_function.nil?
end

Instance Attribute Details

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

Aggregation for attributes.



742
743
744
# File 'quick_sight/cfn_analysis.rb', line 742

def attribute_aggregation_function
  @attribute_aggregation_function
end

#categorical_aggregation_functionString? (readonly)

Aggregation for categorical values.

  • COUNT : Aggregate by the total number of values, including duplicates.
  • DISTINCT_COUNT : Aggregate by the total number of distinct values.


750
751
752
# File 'quick_sight/cfn_analysis.rb', line 750

def categorical_aggregation_function
  @categorical_aggregation_function
end

#date_aggregation_functionString? (readonly)

Aggregation for date values.

  • COUNT : Aggregate by the total number of values, including duplicates.
  • DISTINCT_COUNT : Aggregate by the total number of distinct values.
  • MIN : Select the smallest date value.
  • MAX : Select the largest date value.


760
761
762
# File 'quick_sight/cfn_analysis.rb', line 760

def date_aggregation_function
  @date_aggregation_function
end

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

Aggregation for numerical values.



765
766
767
# File 'quick_sight/cfn_analysis.rb', line 765

def numerical_aggregation_function
  @numerical_aggregation_function
end

Class Method Details

.jsii_propertiesObject



767
768
769
770
771
772
773
774
# File 'quick_sight/cfn_analysis.rb', line 767

def self.jsii_properties
  {
    :attribute_aggregation_function => "attributeAggregationFunction",
    :categorical_aggregation_function => "categoricalAggregationFunction",
    :date_aggregation_function => "dateAggregationFunction",
    :numerical_aggregation_function => "numericalAggregationFunction",
  }
end

Instance Method Details

#to_jsiiObject



776
777
778
779
780
781
782
783
784
785
# File 'quick_sight/cfn_analysis.rb', line 776

def to_jsii
  result = {}
  result.merge!({
    "attributeAggregationFunction" => @attribute_aggregation_function,
    "categoricalAggregationFunction" => @categorical_aggregation_function,
    "dateAggregationFunction" => @date_aggregation_function,
    "numericalAggregationFunction" => @numerical_aggregation_function,
  })
  result.compact
end