Class: AWSCDK::QuickSight::CfnTemplate::AggregationFunctionProperty

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



709
710
711
712
713
714
715
716
717
718
# File 'quick_sight/cfn_template.rb', line 709

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::CfnTemplate::AttributeAggregationFunctionProperty.new(**attribute_aggregation_function.transform_keys(&:to_sym)) : attribute_aggregation_function
  Jsii::Type.check_type(@attribute_aggregation_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLkF0dHJpYnV0ZUFnZ3JlZ2F0aW9uRnVuY3Rpb25Qcm9wZXJ0eSJ9XX19")), "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::CfnTemplate::NumericalAggregationFunctionProperty.new(**numerical_aggregation_function.transform_keys(&:to_sym)) : numerical_aggregation_function
  Jsii::Type.check_type(@numerical_aggregation_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19xdWlja3NpZ2h0LkNmblRlbXBsYXRlLk51bWVyaWNhbEFnZ3JlZ2F0aW9uRnVuY3Rpb25Qcm9wZXJ0eSJ9XX19")), "numericalAggregationFunction") unless @numerical_aggregation_function.nil?
end

Instance Attribute Details

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

Aggregation for attributes.



724
725
726
# File 'quick_sight/cfn_template.rb', line 724

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.


732
733
734
# File 'quick_sight/cfn_template.rb', line 732

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.


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

def date_aggregation_function
  @date_aggregation_function
end

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

Aggregation for numerical values.



747
748
749
# File 'quick_sight/cfn_template.rb', line 747

def numerical_aggregation_function
  @numerical_aggregation_function
end

Class Method Details

.jsii_propertiesObject



749
750
751
752
753
754
755
756
# File 'quick_sight/cfn_template.rb', line 749

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



758
759
760
761
762
763
764
765
766
767
# File 'quick_sight/cfn_template.rb', line 758

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