/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace QuickSight { namespace Model { /** *

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.

See Also:

AWS * API Reference

*/ class AggregationFunction { public: AWS_QUICKSIGHT_API AggregationFunction(); AWS_QUICKSIGHT_API AggregationFunction(Aws::Utils::Json::JsonView jsonValue); AWS_QUICKSIGHT_API AggregationFunction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_QUICKSIGHT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Aggregation for numerical values.

*/ inline const NumericalAggregationFunction& GetNumericalAggregationFunction() const{ return m_numericalAggregationFunction; } /** *

Aggregation for numerical values.

*/ inline bool NumericalAggregationFunctionHasBeenSet() const { return m_numericalAggregationFunctionHasBeenSet; } /** *

Aggregation for numerical values.

*/ inline void SetNumericalAggregationFunction(const NumericalAggregationFunction& value) { m_numericalAggregationFunctionHasBeenSet = true; m_numericalAggregationFunction = value; } /** *

Aggregation for numerical values.

*/ inline void SetNumericalAggregationFunction(NumericalAggregationFunction&& value) { m_numericalAggregationFunctionHasBeenSet = true; m_numericalAggregationFunction = std::move(value); } /** *

Aggregation for numerical values.

*/ inline AggregationFunction& WithNumericalAggregationFunction(const NumericalAggregationFunction& value) { SetNumericalAggregationFunction(value); return *this;} /** *

Aggregation for numerical values.

*/ inline AggregationFunction& WithNumericalAggregationFunction(NumericalAggregationFunction&& value) { SetNumericalAggregationFunction(std::move(value)); return *this;} /** *

Aggregation for categorical values.

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

  • *

    DISTINCT_COUNT: Aggregate by the total number of distinct * values.

*/ inline const CategoricalAggregationFunction& GetCategoricalAggregationFunction() const{ return m_categoricalAggregationFunction; } /** *

Aggregation for categorical values.

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

  • *

    DISTINCT_COUNT: Aggregate by the total number of distinct * values.

*/ inline bool CategoricalAggregationFunctionHasBeenSet() const { return m_categoricalAggregationFunctionHasBeenSet; } /** *

Aggregation for categorical values.

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

  • *

    DISTINCT_COUNT: Aggregate by the total number of distinct * values.

*/ inline void SetCategoricalAggregationFunction(const CategoricalAggregationFunction& value) { m_categoricalAggregationFunctionHasBeenSet = true; m_categoricalAggregationFunction = value; } /** *

Aggregation for categorical values.

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

  • *

    DISTINCT_COUNT: Aggregate by the total number of distinct * values.

*/ inline void SetCategoricalAggregationFunction(CategoricalAggregationFunction&& value) { m_categoricalAggregationFunctionHasBeenSet = true; m_categoricalAggregationFunction = std::move(value); } /** *

Aggregation for categorical values.

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

  • *

    DISTINCT_COUNT: Aggregate by the total number of distinct * values.

*/ inline AggregationFunction& WithCategoricalAggregationFunction(const CategoricalAggregationFunction& value) { SetCategoricalAggregationFunction(value); return *this;} /** *

Aggregation for categorical values.

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

  • *

    DISTINCT_COUNT: Aggregate by the total number of distinct * values.

*/ inline AggregationFunction& WithCategoricalAggregationFunction(CategoricalAggregationFunction&& value) { SetCategoricalAggregationFunction(std::move(value)); return *this;} /** *

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.

*/ inline const DateAggregationFunction& GetDateAggregationFunction() const{ return m_dateAggregationFunction; } /** *

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.

*/ inline bool DateAggregationFunctionHasBeenSet() const { return m_dateAggregationFunctionHasBeenSet; } /** *

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.

*/ inline void SetDateAggregationFunction(const DateAggregationFunction& value) { m_dateAggregationFunctionHasBeenSet = true; m_dateAggregationFunction = value; } /** *

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.

*/ inline void SetDateAggregationFunction(DateAggregationFunction&& value) { m_dateAggregationFunctionHasBeenSet = true; m_dateAggregationFunction = std::move(value); } /** *

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.

*/ inline AggregationFunction& WithDateAggregationFunction(const DateAggregationFunction& value) { SetDateAggregationFunction(value); return *this;} /** *

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.

*/ inline AggregationFunction& WithDateAggregationFunction(DateAggregationFunction&& value) { SetDateAggregationFunction(std::move(value)); return *this;} /** *

Aggregation for attributes.

*/ inline const AttributeAggregationFunction& GetAttributeAggregationFunction() const{ return m_attributeAggregationFunction; } /** *

Aggregation for attributes.

*/ inline bool AttributeAggregationFunctionHasBeenSet() const { return m_attributeAggregationFunctionHasBeenSet; } /** *

Aggregation for attributes.

*/ inline void SetAttributeAggregationFunction(const AttributeAggregationFunction& value) { m_attributeAggregationFunctionHasBeenSet = true; m_attributeAggregationFunction = value; } /** *

Aggregation for attributes.

*/ inline void SetAttributeAggregationFunction(AttributeAggregationFunction&& value) { m_attributeAggregationFunctionHasBeenSet = true; m_attributeAggregationFunction = std::move(value); } /** *

Aggregation for attributes.

*/ inline AggregationFunction& WithAttributeAggregationFunction(const AttributeAggregationFunction& value) { SetAttributeAggregationFunction(value); return *this;} /** *

Aggregation for attributes.

*/ inline AggregationFunction& WithAttributeAggregationFunction(AttributeAggregationFunction&& value) { SetAttributeAggregationFunction(std::move(value)); return *this;} private: NumericalAggregationFunction m_numericalAggregationFunction; bool m_numericalAggregationFunctionHasBeenSet = false; CategoricalAggregationFunction m_categoricalAggregationFunction; bool m_categoricalAggregationFunctionHasBeenSet = false; DateAggregationFunction m_dateAggregationFunction; bool m_dateAggregationFunctionHasBeenSet = false; AttributeAggregationFunction m_attributeAggregationFunction; bool m_attributeAggregationFunctionHasBeenSet = false; }; } // namespace Model } // namespace QuickSight } // namespace Aws