/* * 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; /** *
* A structure that represents additional options for display formatting. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DisplayFormatOptions implements Serializable, Cloneable, StructuredPojo { /** ** A Boolean value that indicates whether to use blank cell format. *
*/ private Boolean useBlankCellFormat; /** ** Determines the blank cell format. *
*/ private String blankCellFormat; /** *
* Determines the DateTime
format.
*
* Determines the decimal separator. *
*/ private String decimalSeparator; /** ** Determines the grouping separator. *
*/ private String groupingSeparator; /** ** A Boolean value that indicates whether to use grouping. *
*/ private Boolean useGrouping; /** ** Determines the number of fraction digits. *
*/ private Integer fractionDigits; /** ** The prefix value for a display format. *
*/ private String prefix; /** ** The suffix value for a display format. *
*/ private String suffix; /** *
* The unit scaler. Valid values for this structure are: NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
*
* The negative format. *
*/ private NegativeFormat negativeFormat; /** *
* The currency symbol, such as USD
.
*
* A Boolean value that indicates whether to use blank cell format. *
* * @param useBlankCellFormat * A Boolean value that indicates whether to use blank cell format. */ public void setUseBlankCellFormat(Boolean useBlankCellFormat) { this.useBlankCellFormat = useBlankCellFormat; } /** ** A Boolean value that indicates whether to use blank cell format. *
* * @return A Boolean value that indicates whether to use blank cell format. */ public Boolean getUseBlankCellFormat() { return this.useBlankCellFormat; } /** ** A Boolean value that indicates whether to use blank cell format. *
* * @param useBlankCellFormat * A Boolean value that indicates whether to use blank cell format. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withUseBlankCellFormat(Boolean useBlankCellFormat) { setUseBlankCellFormat(useBlankCellFormat); return this; } /** ** A Boolean value that indicates whether to use blank cell format. *
* * @return A Boolean value that indicates whether to use blank cell format. */ public Boolean isUseBlankCellFormat() { return this.useBlankCellFormat; } /** ** Determines the blank cell format. *
* * @param blankCellFormat * Determines the blank cell format. */ public void setBlankCellFormat(String blankCellFormat) { this.blankCellFormat = blankCellFormat; } /** ** Determines the blank cell format. *
* * @return Determines the blank cell format. */ public String getBlankCellFormat() { return this.blankCellFormat; } /** ** Determines the blank cell format. *
* * @param blankCellFormat * Determines the blank cell format. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withBlankCellFormat(String blankCellFormat) { setBlankCellFormat(blankCellFormat); return this; } /** *
* Determines the DateTime
format.
*
DateTime
format.
*/
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
}
/**
*
* Determines the DateTime
format.
*
DateTime
format.
*/
public String getDateFormat() {
return this.dateFormat;
}
/**
*
* Determines the DateTime
format.
*
DateTime
format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisplayFormatOptions withDateFormat(String dateFormat) {
setDateFormat(dateFormat);
return this;
}
/**
* * Determines the decimal separator. *
* * @param decimalSeparator * Determines the decimal separator. * @see TopicNumericSeparatorSymbol */ public void setDecimalSeparator(String decimalSeparator) { this.decimalSeparator = decimalSeparator; } /** ** Determines the decimal separator. *
* * @return Determines the decimal separator. * @see TopicNumericSeparatorSymbol */ public String getDecimalSeparator() { return this.decimalSeparator; } /** ** Determines the decimal separator. *
* * @param decimalSeparator * Determines the decimal separator. * @return Returns a reference to this object so that method calls can be chained together. * @see TopicNumericSeparatorSymbol */ public DisplayFormatOptions withDecimalSeparator(String decimalSeparator) { setDecimalSeparator(decimalSeparator); return this; } /** ** Determines the decimal separator. *
* * @param decimalSeparator * Determines the decimal separator. * @return Returns a reference to this object so that method calls can be chained together. * @see TopicNumericSeparatorSymbol */ public DisplayFormatOptions withDecimalSeparator(TopicNumericSeparatorSymbol decimalSeparator) { this.decimalSeparator = decimalSeparator.toString(); return this; } /** ** Determines the grouping separator. *
* * @param groupingSeparator * Determines the grouping separator. */ public void setGroupingSeparator(String groupingSeparator) { this.groupingSeparator = groupingSeparator; } /** ** Determines the grouping separator. *
* * @return Determines the grouping separator. */ public String getGroupingSeparator() { return this.groupingSeparator; } /** ** Determines the grouping separator. *
* * @param groupingSeparator * Determines the grouping separator. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withGroupingSeparator(String groupingSeparator) { setGroupingSeparator(groupingSeparator); return this; } /** ** A Boolean value that indicates whether to use grouping. *
* * @param useGrouping * A Boolean value that indicates whether to use grouping. */ public void setUseGrouping(Boolean useGrouping) { this.useGrouping = useGrouping; } /** ** A Boolean value that indicates whether to use grouping. *
* * @return A Boolean value that indicates whether to use grouping. */ public Boolean getUseGrouping() { return this.useGrouping; } /** ** A Boolean value that indicates whether to use grouping. *
* * @param useGrouping * A Boolean value that indicates whether to use grouping. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withUseGrouping(Boolean useGrouping) { setUseGrouping(useGrouping); return this; } /** ** A Boolean value that indicates whether to use grouping. *
* * @return A Boolean value that indicates whether to use grouping. */ public Boolean isUseGrouping() { return this.useGrouping; } /** ** Determines the number of fraction digits. *
* * @param fractionDigits * Determines the number of fraction digits. */ public void setFractionDigits(Integer fractionDigits) { this.fractionDigits = fractionDigits; } /** ** Determines the number of fraction digits. *
* * @return Determines the number of fraction digits. */ public Integer getFractionDigits() { return this.fractionDigits; } /** ** Determines the number of fraction digits. *
* * @param fractionDigits * Determines the number of fraction digits. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withFractionDigits(Integer fractionDigits) { setFractionDigits(fractionDigits); return this; } /** ** The prefix value for a display format. *
* * @param prefix * The prefix value for a display format. */ public void setPrefix(String prefix) { this.prefix = prefix; } /** ** The prefix value for a display format. *
* * @return The prefix value for a display format. */ public String getPrefix() { return this.prefix; } /** ** The prefix value for a display format. *
* * @param prefix * The prefix value for a display format. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withPrefix(String prefix) { setPrefix(prefix); return this; } /** ** The suffix value for a display format. *
* * @param suffix * The suffix value for a display format. */ public void setSuffix(String suffix) { this.suffix = suffix; } /** ** The suffix value for a display format. *
* * @return The suffix value for a display format. */ public String getSuffix() { return this.suffix; } /** ** The suffix value for a display format. *
* * @param suffix * The suffix value for a display format. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withSuffix(String suffix) { setSuffix(suffix); return this; } /** *
* The unit scaler. Valid values for this structure are: NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
*
NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
* @see NumberScale
*/
public void setUnitScaler(String unitScaler) {
this.unitScaler = unitScaler;
}
/**
*
* The unit scaler. Valid values for this structure are: NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
*
NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
* @see NumberScale
*/
public String getUnitScaler() {
return this.unitScaler;
}
/**
*
* The unit scaler. Valid values for this structure are: NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
*
NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NumberScale
*/
public DisplayFormatOptions withUnitScaler(String unitScaler) {
setUnitScaler(unitScaler);
return this;
}
/**
*
* The unit scaler. Valid values for this structure are: NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
*
NONE
, AUTO
,
* THOUSANDS
, MILLIONS
, BILLIONS
, and TRILLIONS
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NumberScale
*/
public DisplayFormatOptions withUnitScaler(NumberScale unitScaler) {
this.unitScaler = unitScaler.toString();
return this;
}
/**
* * The negative format. *
* * @param negativeFormat * The negative format. */ public void setNegativeFormat(NegativeFormat negativeFormat) { this.negativeFormat = negativeFormat; } /** ** The negative format. *
* * @return The negative format. */ public NegativeFormat getNegativeFormat() { return this.negativeFormat; } /** ** The negative format. *
* * @param negativeFormat * The negative format. * @return Returns a reference to this object so that method calls can be chained together. */ public DisplayFormatOptions withNegativeFormat(NegativeFormat negativeFormat) { setNegativeFormat(negativeFormat); return this; } /** *
* The currency symbol, such as USD
.
*
USD
.
*/
public void setCurrencySymbol(String currencySymbol) {
this.currencySymbol = currencySymbol;
}
/**
*
* The currency symbol, such as USD
.
*
USD
.
*/
public String getCurrencySymbol() {
return this.currencySymbol;
}
/**
*
* The currency symbol, such as USD
.
*
USD
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisplayFormatOptions withCurrencySymbol(String currencySymbol) {
setCurrencySymbol(currencySymbol);
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 (getUseBlankCellFormat() != null)
sb.append("UseBlankCellFormat: ").append(getUseBlankCellFormat()).append(",");
if (getBlankCellFormat() != null)
sb.append("BlankCellFormat: ").append(getBlankCellFormat()).append(",");
if (getDateFormat() != null)
sb.append("DateFormat: ").append(getDateFormat()).append(",");
if (getDecimalSeparator() != null)
sb.append("DecimalSeparator: ").append(getDecimalSeparator()).append(",");
if (getGroupingSeparator() != null)
sb.append("GroupingSeparator: ").append(getGroupingSeparator()).append(",");
if (getUseGrouping() != null)
sb.append("UseGrouping: ").append(getUseGrouping()).append(",");
if (getFractionDigits() != null)
sb.append("FractionDigits: ").append(getFractionDigits()).append(",");
if (getPrefix() != null)
sb.append("Prefix: ").append(getPrefix()).append(",");
if (getSuffix() != null)
sb.append("Suffix: ").append(getSuffix()).append(",");
if (getUnitScaler() != null)
sb.append("UnitScaler: ").append(getUnitScaler()).append(",");
if (getNegativeFormat() != null)
sb.append("NegativeFormat: ").append(getNegativeFormat()).append(",");
if (getCurrencySymbol() != null)
sb.append("CurrencySymbol: ").append(getCurrencySymbol());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DisplayFormatOptions == false)
return false;
DisplayFormatOptions other = (DisplayFormatOptions) obj;
if (other.getUseBlankCellFormat() == null ^ this.getUseBlankCellFormat() == null)
return false;
if (other.getUseBlankCellFormat() != null && other.getUseBlankCellFormat().equals(this.getUseBlankCellFormat()) == false)
return false;
if (other.getBlankCellFormat() == null ^ this.getBlankCellFormat() == null)
return false;
if (other.getBlankCellFormat() != null && other.getBlankCellFormat().equals(this.getBlankCellFormat()) == false)
return false;
if (other.getDateFormat() == null ^ this.getDateFormat() == null)
return false;
if (other.getDateFormat() != null && other.getDateFormat().equals(this.getDateFormat()) == false)
return false;
if (other.getDecimalSeparator() == null ^ this.getDecimalSeparator() == null)
return false;
if (other.getDecimalSeparator() != null && other.getDecimalSeparator().equals(this.getDecimalSeparator()) == false)
return false;
if (other.getGroupingSeparator() == null ^ this.getGroupingSeparator() == null)
return false;
if (other.getGroupingSeparator() != null && other.getGroupingSeparator().equals(this.getGroupingSeparator()) == false)
return false;
if (other.getUseGrouping() == null ^ this.getUseGrouping() == null)
return false;
if (other.getUseGrouping() != null && other.getUseGrouping().equals(this.getUseGrouping()) == false)
return false;
if (other.getFractionDigits() == null ^ this.getFractionDigits() == null)
return false;
if (other.getFractionDigits() != null && other.getFractionDigits().equals(this.getFractionDigits()) == false)
return false;
if (other.getPrefix() == null ^ this.getPrefix() == null)
return false;
if (other.getPrefix() != null && other.getPrefix().equals(this.getPrefix()) == false)
return false;
if (other.getSuffix() == null ^ this.getSuffix() == null)
return false;
if (other.getSuffix() != null && other.getSuffix().equals(this.getSuffix()) == false)
return false;
if (other.getUnitScaler() == null ^ this.getUnitScaler() == null)
return false;
if (other.getUnitScaler() != null && other.getUnitScaler().equals(this.getUnitScaler()) == false)
return false;
if (other.getNegativeFormat() == null ^ this.getNegativeFormat() == null)
return false;
if (other.getNegativeFormat() != null && other.getNegativeFormat().equals(this.getNegativeFormat()) == false)
return false;
if (other.getCurrencySymbol() == null ^ this.getCurrencySymbol() == null)
return false;
if (other.getCurrencySymbol() != null && other.getCurrencySymbol().equals(this.getCurrencySymbol()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getUseBlankCellFormat() == null) ? 0 : getUseBlankCellFormat().hashCode());
hashCode = prime * hashCode + ((getBlankCellFormat() == null) ? 0 : getBlankCellFormat().hashCode());
hashCode = prime * hashCode + ((getDateFormat() == null) ? 0 : getDateFormat().hashCode());
hashCode = prime * hashCode + ((getDecimalSeparator() == null) ? 0 : getDecimalSeparator().hashCode());
hashCode = prime * hashCode + ((getGroupingSeparator() == null) ? 0 : getGroupingSeparator().hashCode());
hashCode = prime * hashCode + ((getUseGrouping() == null) ? 0 : getUseGrouping().hashCode());
hashCode = prime * hashCode + ((getFractionDigits() == null) ? 0 : getFractionDigits().hashCode());
hashCode = prime * hashCode + ((getPrefix() == null) ? 0 : getPrefix().hashCode());
hashCode = prime * hashCode + ((getSuffix() == null) ? 0 : getSuffix().hashCode());
hashCode = prime * hashCode + ((getUnitScaler() == null) ? 0 : getUnitScaler().hashCode());
hashCode = prime * hashCode + ((getNegativeFormat() == null) ? 0 : getNegativeFormat().hashCode());
hashCode = prime * hashCode + ((getCurrencySymbol() == null) ? 0 : getCurrencySymbol().hashCode());
return hashCode;
}
@Override
public DisplayFormatOptions clone() {
try {
return (DisplayFormatOptions) 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.DisplayFormatOptionsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}