/* * 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; /** *
* The dynamic configuration of the reference line data configuration. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ReferenceLineDynamicDataConfiguration implements Serializable, Cloneable, StructuredPojo { /** ** The column that the dynamic data targets. *
*/ private ColumnIdentifier column; /** ** The aggregation function that is used in the dynamic data. *
*/ private AggregationFunction measureAggregationFunction; /** ** The calculation that is used in the dynamic data. *
*/ private NumericalAggregationFunction calculation; /** ** The column that the dynamic data targets. *
* * @param column * The column that the dynamic data targets. */ public void setColumn(ColumnIdentifier column) { this.column = column; } /** ** The column that the dynamic data targets. *
* * @return The column that the dynamic data targets. */ public ColumnIdentifier getColumn() { return this.column; } /** ** The column that the dynamic data targets. *
* * @param column * The column that the dynamic data targets. * @return Returns a reference to this object so that method calls can be chained together. */ public ReferenceLineDynamicDataConfiguration withColumn(ColumnIdentifier column) { setColumn(column); return this; } /** ** The aggregation function that is used in the dynamic data. *
* * @param measureAggregationFunction * The aggregation function that is used in the dynamic data. */ public void setMeasureAggregationFunction(AggregationFunction measureAggregationFunction) { this.measureAggregationFunction = measureAggregationFunction; } /** ** The aggregation function that is used in the dynamic data. *
* * @return The aggregation function that is used in the dynamic data. */ public AggregationFunction getMeasureAggregationFunction() { return this.measureAggregationFunction; } /** ** The aggregation function that is used in the dynamic data. *
* * @param measureAggregationFunction * The aggregation function that is used in the dynamic data. * @return Returns a reference to this object so that method calls can be chained together. */ public ReferenceLineDynamicDataConfiguration withMeasureAggregationFunction(AggregationFunction measureAggregationFunction) { setMeasureAggregationFunction(measureAggregationFunction); return this; } /** ** The calculation that is used in the dynamic data. *
* * @param calculation * The calculation that is used in the dynamic data. */ public void setCalculation(NumericalAggregationFunction calculation) { this.calculation = calculation; } /** ** The calculation that is used in the dynamic data. *
* * @return The calculation that is used in the dynamic data. */ public NumericalAggregationFunction getCalculation() { return this.calculation; } /** ** The calculation that is used in the dynamic data. *
* * @param calculation * The calculation that is used in the dynamic data. * @return Returns a reference to this object so that method calls can be chained together. */ public ReferenceLineDynamicDataConfiguration withCalculation(NumericalAggregationFunction calculation) { setCalculation(calculation); 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 (getColumn() != null) sb.append("Column: ").append(getColumn()).append(","); if (getMeasureAggregationFunction() != null) sb.append("MeasureAggregationFunction: ").append(getMeasureAggregationFunction()).append(","); if (getCalculation() != null) sb.append("Calculation: ").append(getCalculation()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReferenceLineDynamicDataConfiguration == false) return false; ReferenceLineDynamicDataConfiguration other = (ReferenceLineDynamicDataConfiguration) obj; if (other.getColumn() == null ^ this.getColumn() == null) return false; if (other.getColumn() != null && other.getColumn().equals(this.getColumn()) == false) return false; if (other.getMeasureAggregationFunction() == null ^ this.getMeasureAggregationFunction() == null) return false; if (other.getMeasureAggregationFunction() != null && other.getMeasureAggregationFunction().equals(this.getMeasureAggregationFunction()) == false) return false; if (other.getCalculation() == null ^ this.getCalculation() == null) return false; if (other.getCalculation() != null && other.getCalculation().equals(this.getCalculation()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getColumn() == null) ? 0 : getColumn().hashCode()); hashCode = prime * hashCode + ((getMeasureAggregationFunction() == null) ? 0 : getMeasureAggregationFunction().hashCode()); hashCode = prime * hashCode + ((getCalculation() == null) ? 0 : getCalculation().hashCode()); return hashCode; } @Override public ReferenceLineDynamicDataConfiguration clone() { try { return (ReferenceLineDynamicDataConfiguration) 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.ReferenceLineDynamicDataConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }