/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.quicksight.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Aggregation for numerical values. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class NumericalAggregationFunction implements Serializable, Cloneable, StructuredPojo { /** ** Built-in aggregation functions for numerical values. *
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* An aggregation based on the percentile of values in a dimension or measure. *
*/ private PercentileAggregation percentileAggregation; /** ** Built-in aggregation functions for numerical values. *
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* Built-in aggregation functions for numerical values. *
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* Built-in aggregation functions for numerical values. *
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* Built-in aggregation functions for numerical values. *
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* SUM
: The sum of a dimension or measure.
*
* AVERAGE
: The average of a dimension or measure.
*
* MIN
: The minimum value of a dimension or measure.
*
* MAX
: The maximum value of a dimension or measure.
*
* COUNT
: The count of a dimension or measure.
*
* DISTINCT_COUNT
: The count of distinct values in a dimension or measure.
*
* VAR
: The variance of a dimension or measure.
*
* VARP
: The partitioned variance of a dimension or measure.
*
* STDEV
: The standard deviation of a dimension or measure.
*
* STDEVP
: The partitioned standard deviation of a dimension or measure.
*
* MEDIAN
: The median value of a dimension or measure.
*
* An aggregation based on the percentile of values in a dimension or measure. *
* * @param percentileAggregation * An aggregation based on the percentile of values in a dimension or measure. */ public void setPercentileAggregation(PercentileAggregation percentileAggregation) { this.percentileAggregation = percentileAggregation; } /** ** An aggregation based on the percentile of values in a dimension or measure. *
* * @return An aggregation based on the percentile of values in a dimension or measure. */ public PercentileAggregation getPercentileAggregation() { return this.percentileAggregation; } /** ** An aggregation based on the percentile of values in a dimension or measure. *
* * @param percentileAggregation * An aggregation based on the percentile of values in a dimension or measure. * @return Returns a reference to this object so that method calls can be chained together. */ public NumericalAggregationFunction withPercentileAggregation(PercentileAggregation percentileAggregation) { setPercentileAggregation(percentileAggregation); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getSimpleNumericalAggregation() != null) sb.append("SimpleNumericalAggregation: ").append(getSimpleNumericalAggregation()).append(","); if (getPercentileAggregation() != null) sb.append("PercentileAggregation: ").append(getPercentileAggregation()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof NumericalAggregationFunction == false) return false; NumericalAggregationFunction other = (NumericalAggregationFunction) obj; if (other.getSimpleNumericalAggregation() == null ^ this.getSimpleNumericalAggregation() == null) return false; if (other.getSimpleNumericalAggregation() != null && other.getSimpleNumericalAggregation().equals(this.getSimpleNumericalAggregation()) == false) return false; if (other.getPercentileAggregation() == null ^ this.getPercentileAggregation() == null) return false; if (other.getPercentileAggregation() != null && other.getPercentileAggregation().equals(this.getPercentileAggregation()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSimpleNumericalAggregation() == null) ? 0 : getSimpleNumericalAggregation().hashCode()); hashCode = prime * hashCode + ((getPercentileAggregation() == null) ? 0 : getPercentileAggregation().hashCode()); return hashCode; } @Override public NumericalAggregationFunction clone() { try { return (NumericalAggregationFunction) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.quicksight.model.transform.NumericalAggregationFunctionMarshaller.getInstance().marshall(this, protocolMarshaller); } }