com.amazonaws.services.quicksight.model.PivotTableOptions Maven / Gradle / Ivy
Show all versions of aws-java-sdk-quicksight Show documentation
/*
* 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 table options for a pivot table visual.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class PivotTableOptions implements Serializable, Cloneable, StructuredPojo {
/**
*
* The metric placement (row, column) options.
*
*/
private String metricPlacement;
/**
*
* The visibility of the single metric options.
*
*/
private String singleMetricVisibility;
/**
*
* The visibility of the column names.
*
*/
private String columnNamesVisibility;
/**
*
* Determines the visibility of the pivot table.
*
*/
private String toggleButtonsVisibility;
/**
*
* The table cell style of the column header.
*
*/
private TableCellStyle columnHeaderStyle;
/**
*
* The table cell style of the row headers.
*
*/
private TableCellStyle rowHeaderStyle;
/**
*
* The table cell style of cells.
*
*/
private TableCellStyle cellStyle;
/**
*
* The table cell style of row field names.
*
*/
private TableCellStyle rowFieldNamesStyle;
/**
*
* The row alternate color options (widget status, row alternate colors).
*
*/
private RowAlternateColorOptions rowAlternateColorOptions;
/**
*
* The metric placement (row, column) options.
*
*
* @param metricPlacement
* The metric placement (row, column) options.
* @see PivotTableMetricPlacement
*/
public void setMetricPlacement(String metricPlacement) {
this.metricPlacement = metricPlacement;
}
/**
*
* The metric placement (row, column) options.
*
*
* @return The metric placement (row, column) options.
* @see PivotTableMetricPlacement
*/
public String getMetricPlacement() {
return this.metricPlacement;
}
/**
*
* The metric placement (row, column) options.
*
*
* @param metricPlacement
* The metric placement (row, column) options.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PivotTableMetricPlacement
*/
public PivotTableOptions withMetricPlacement(String metricPlacement) {
setMetricPlacement(metricPlacement);
return this;
}
/**
*
* The metric placement (row, column) options.
*
*
* @param metricPlacement
* The metric placement (row, column) options.
* @return Returns a reference to this object so that method calls can be chained together.
* @see PivotTableMetricPlacement
*/
public PivotTableOptions withMetricPlacement(PivotTableMetricPlacement metricPlacement) {
this.metricPlacement = metricPlacement.toString();
return this;
}
/**
*
* The visibility of the single metric options.
*
*
* @param singleMetricVisibility
* The visibility of the single metric options.
* @see Visibility
*/
public void setSingleMetricVisibility(String singleMetricVisibility) {
this.singleMetricVisibility = singleMetricVisibility;
}
/**
*
* The visibility of the single metric options.
*
*
* @return The visibility of the single metric options.
* @see Visibility
*/
public String getSingleMetricVisibility() {
return this.singleMetricVisibility;
}
/**
*
* The visibility of the single metric options.
*
*
* @param singleMetricVisibility
* The visibility of the single metric options.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Visibility
*/
public PivotTableOptions withSingleMetricVisibility(String singleMetricVisibility) {
setSingleMetricVisibility(singleMetricVisibility);
return this;
}
/**
*
* The visibility of the single metric options.
*
*
* @param singleMetricVisibility
* The visibility of the single metric options.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Visibility
*/
public PivotTableOptions withSingleMetricVisibility(Visibility singleMetricVisibility) {
this.singleMetricVisibility = singleMetricVisibility.toString();
return this;
}
/**
*
* The visibility of the column names.
*
*
* @param columnNamesVisibility
* The visibility of the column names.
* @see Visibility
*/
public void setColumnNamesVisibility(String columnNamesVisibility) {
this.columnNamesVisibility = columnNamesVisibility;
}
/**
*
* The visibility of the column names.
*
*
* @return The visibility of the column names.
* @see Visibility
*/
public String getColumnNamesVisibility() {
return this.columnNamesVisibility;
}
/**
*
* The visibility of the column names.
*
*
* @param columnNamesVisibility
* The visibility of the column names.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Visibility
*/
public PivotTableOptions withColumnNamesVisibility(String columnNamesVisibility) {
setColumnNamesVisibility(columnNamesVisibility);
return this;
}
/**
*
* The visibility of the column names.
*
*
* @param columnNamesVisibility
* The visibility of the column names.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Visibility
*/
public PivotTableOptions withColumnNamesVisibility(Visibility columnNamesVisibility) {
this.columnNamesVisibility = columnNamesVisibility.toString();
return this;
}
/**
*
* Determines the visibility of the pivot table.
*
*
* @param toggleButtonsVisibility
* Determines the visibility of the pivot table.
* @see Visibility
*/
public void setToggleButtonsVisibility(String toggleButtonsVisibility) {
this.toggleButtonsVisibility = toggleButtonsVisibility;
}
/**
*
* Determines the visibility of the pivot table.
*
*
* @return Determines the visibility of the pivot table.
* @see Visibility
*/
public String getToggleButtonsVisibility() {
return this.toggleButtonsVisibility;
}
/**
*
* Determines the visibility of the pivot table.
*
*
* @param toggleButtonsVisibility
* Determines the visibility of the pivot table.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Visibility
*/
public PivotTableOptions withToggleButtonsVisibility(String toggleButtonsVisibility) {
setToggleButtonsVisibility(toggleButtonsVisibility);
return this;
}
/**
*
* Determines the visibility of the pivot table.
*
*
* @param toggleButtonsVisibility
* Determines the visibility of the pivot table.
* @return Returns a reference to this object so that method calls can be chained together.
* @see Visibility
*/
public PivotTableOptions withToggleButtonsVisibility(Visibility toggleButtonsVisibility) {
this.toggleButtonsVisibility = toggleButtonsVisibility.toString();
return this;
}
/**
*
* The table cell style of the column header.
*
*
* @param columnHeaderStyle
* The table cell style of the column header.
*/
public void setColumnHeaderStyle(TableCellStyle columnHeaderStyle) {
this.columnHeaderStyle = columnHeaderStyle;
}
/**
*
* The table cell style of the column header.
*
*
* @return The table cell style of the column header.
*/
public TableCellStyle getColumnHeaderStyle() {
return this.columnHeaderStyle;
}
/**
*
* The table cell style of the column header.
*
*
* @param columnHeaderStyle
* The table cell style of the column header.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PivotTableOptions withColumnHeaderStyle(TableCellStyle columnHeaderStyle) {
setColumnHeaderStyle(columnHeaderStyle);
return this;
}
/**
*
* The table cell style of the row headers.
*
*
* @param rowHeaderStyle
* The table cell style of the row headers.
*/
public void setRowHeaderStyle(TableCellStyle rowHeaderStyle) {
this.rowHeaderStyle = rowHeaderStyle;
}
/**
*
* The table cell style of the row headers.
*
*
* @return The table cell style of the row headers.
*/
public TableCellStyle getRowHeaderStyle() {
return this.rowHeaderStyle;
}
/**
*
* The table cell style of the row headers.
*
*
* @param rowHeaderStyle
* The table cell style of the row headers.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PivotTableOptions withRowHeaderStyle(TableCellStyle rowHeaderStyle) {
setRowHeaderStyle(rowHeaderStyle);
return this;
}
/**
*
* The table cell style of cells.
*
*
* @param cellStyle
* The table cell style of cells.
*/
public void setCellStyle(TableCellStyle cellStyle) {
this.cellStyle = cellStyle;
}
/**
*
* The table cell style of cells.
*
*
* @return The table cell style of cells.
*/
public TableCellStyle getCellStyle() {
return this.cellStyle;
}
/**
*
* The table cell style of cells.
*
*
* @param cellStyle
* The table cell style of cells.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PivotTableOptions withCellStyle(TableCellStyle cellStyle) {
setCellStyle(cellStyle);
return this;
}
/**
*
* The table cell style of row field names.
*
*
* @param rowFieldNamesStyle
* The table cell style of row field names.
*/
public void setRowFieldNamesStyle(TableCellStyle rowFieldNamesStyle) {
this.rowFieldNamesStyle = rowFieldNamesStyle;
}
/**
*
* The table cell style of row field names.
*
*
* @return The table cell style of row field names.
*/
public TableCellStyle getRowFieldNamesStyle() {
return this.rowFieldNamesStyle;
}
/**
*
* The table cell style of row field names.
*
*
* @param rowFieldNamesStyle
* The table cell style of row field names.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PivotTableOptions withRowFieldNamesStyle(TableCellStyle rowFieldNamesStyle) {
setRowFieldNamesStyle(rowFieldNamesStyle);
return this;
}
/**
*
* The row alternate color options (widget status, row alternate colors).
*
*
* @param rowAlternateColorOptions
* The row alternate color options (widget status, row alternate colors).
*/
public void setRowAlternateColorOptions(RowAlternateColorOptions rowAlternateColorOptions) {
this.rowAlternateColorOptions = rowAlternateColorOptions;
}
/**
*
* The row alternate color options (widget status, row alternate colors).
*
*
* @return The row alternate color options (widget status, row alternate colors).
*/
public RowAlternateColorOptions getRowAlternateColorOptions() {
return this.rowAlternateColorOptions;
}
/**
*
* The row alternate color options (widget status, row alternate colors).
*
*
* @param rowAlternateColorOptions
* The row alternate color options (widget status, row alternate colors).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PivotTableOptions withRowAlternateColorOptions(RowAlternateColorOptions rowAlternateColorOptions) {
setRowAlternateColorOptions(rowAlternateColorOptions);
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 (getMetricPlacement() != null)
sb.append("MetricPlacement: ").append(getMetricPlacement()).append(",");
if (getSingleMetricVisibility() != null)
sb.append("SingleMetricVisibility: ").append(getSingleMetricVisibility()).append(",");
if (getColumnNamesVisibility() != null)
sb.append("ColumnNamesVisibility: ").append(getColumnNamesVisibility()).append(",");
if (getToggleButtonsVisibility() != null)
sb.append("ToggleButtonsVisibility: ").append(getToggleButtonsVisibility()).append(",");
if (getColumnHeaderStyle() != null)
sb.append("ColumnHeaderStyle: ").append(getColumnHeaderStyle()).append(",");
if (getRowHeaderStyle() != null)
sb.append("RowHeaderStyle: ").append(getRowHeaderStyle()).append(",");
if (getCellStyle() != null)
sb.append("CellStyle: ").append(getCellStyle()).append(",");
if (getRowFieldNamesStyle() != null)
sb.append("RowFieldNamesStyle: ").append(getRowFieldNamesStyle()).append(",");
if (getRowAlternateColorOptions() != null)
sb.append("RowAlternateColorOptions: ").append(getRowAlternateColorOptions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PivotTableOptions == false)
return false;
PivotTableOptions other = (PivotTableOptions) obj;
if (other.getMetricPlacement() == null ^ this.getMetricPlacement() == null)
return false;
if (other.getMetricPlacement() != null && other.getMetricPlacement().equals(this.getMetricPlacement()) == false)
return false;
if (other.getSingleMetricVisibility() == null ^ this.getSingleMetricVisibility() == null)
return false;
if (other.getSingleMetricVisibility() != null && other.getSingleMetricVisibility().equals(this.getSingleMetricVisibility()) == false)
return false;
if (other.getColumnNamesVisibility() == null ^ this.getColumnNamesVisibility() == null)
return false;
if (other.getColumnNamesVisibility() != null && other.getColumnNamesVisibility().equals(this.getColumnNamesVisibility()) == false)
return false;
if (other.getToggleButtonsVisibility() == null ^ this.getToggleButtonsVisibility() == null)
return false;
if (other.getToggleButtonsVisibility() != null && other.getToggleButtonsVisibility().equals(this.getToggleButtonsVisibility()) == false)
return false;
if (other.getColumnHeaderStyle() == null ^ this.getColumnHeaderStyle() == null)
return false;
if (other.getColumnHeaderStyle() != null && other.getColumnHeaderStyle().equals(this.getColumnHeaderStyle()) == false)
return false;
if (other.getRowHeaderStyle() == null ^ this.getRowHeaderStyle() == null)
return false;
if (other.getRowHeaderStyle() != null && other.getRowHeaderStyle().equals(this.getRowHeaderStyle()) == false)
return false;
if (other.getCellStyle() == null ^ this.getCellStyle() == null)
return false;
if (other.getCellStyle() != null && other.getCellStyle().equals(this.getCellStyle()) == false)
return false;
if (other.getRowFieldNamesStyle() == null ^ this.getRowFieldNamesStyle() == null)
return false;
if (other.getRowFieldNamesStyle() != null && other.getRowFieldNamesStyle().equals(this.getRowFieldNamesStyle()) == false)
return false;
if (other.getRowAlternateColorOptions() == null ^ this.getRowAlternateColorOptions() == null)
return false;
if (other.getRowAlternateColorOptions() != null && other.getRowAlternateColorOptions().equals(this.getRowAlternateColorOptions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMetricPlacement() == null) ? 0 : getMetricPlacement().hashCode());
hashCode = prime * hashCode + ((getSingleMetricVisibility() == null) ? 0 : getSingleMetricVisibility().hashCode());
hashCode = prime * hashCode + ((getColumnNamesVisibility() == null) ? 0 : getColumnNamesVisibility().hashCode());
hashCode = prime * hashCode + ((getToggleButtonsVisibility() == null) ? 0 : getToggleButtonsVisibility().hashCode());
hashCode = prime * hashCode + ((getColumnHeaderStyle() == null) ? 0 : getColumnHeaderStyle().hashCode());
hashCode = prime * hashCode + ((getRowHeaderStyle() == null) ? 0 : getRowHeaderStyle().hashCode());
hashCode = prime * hashCode + ((getCellStyle() == null) ? 0 : getCellStyle().hashCode());
hashCode = prime * hashCode + ((getRowFieldNamesStyle() == null) ? 0 : getRowFieldNamesStyle().hashCode());
hashCode = prime * hashCode + ((getRowAlternateColorOptions() == null) ? 0 : getRowAlternateColorOptions().hashCode());
return hashCode;
}
@Override
public PivotTableOptions clone() {
try {
return (PivotTableOptions) 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.PivotTableOptionsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}