com.amazonaws.services.quicksight.model.TopicIR Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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 definition for a TopicIR
.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class TopicIR implements Serializable, Cloneable, StructuredPojo {
/**
*
* The metrics for the TopicIR
.
*
*/
private java.util.List metrics;
/**
*
* The GroupBy list for the TopicIR
.
*
*/
private java.util.List groupByList;
/**
*
* The filters for the TopicIR
.
*
*/
private java.util.List> filters;
/**
*
* The sort for the TopicIR
.
*
*/
private TopicSortClause sort;
/**
*
* The contribution analysis for the TopicIR
.
*
*/
private TopicIRContributionAnalysis contributionAnalysis;
/**
*
* The visual for the TopicIR
.
*
*/
private VisualOptions visual;
/**
*
* The metrics for the TopicIR
.
*
*
* @return The metrics for the TopicIR
.
*/
public java.util.List getMetrics() {
return metrics;
}
/**
*
* The metrics for the TopicIR
.
*
*
* @param metrics
* The metrics for the TopicIR
.
*/
public void setMetrics(java.util.Collection metrics) {
if (metrics == null) {
this.metrics = null;
return;
}
this.metrics = new java.util.ArrayList(metrics);
}
/**
*
* The metrics for the TopicIR
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setMetrics(java.util.Collection)} or {@link #withMetrics(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param metrics
* The metrics for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withMetrics(TopicIRMetric... metrics) {
if (this.metrics == null) {
setMetrics(new java.util.ArrayList(metrics.length));
}
for (TopicIRMetric ele : metrics) {
this.metrics.add(ele);
}
return this;
}
/**
*
* The metrics for the TopicIR
.
*
*
* @param metrics
* The metrics for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withMetrics(java.util.Collection metrics) {
setMetrics(metrics);
return this;
}
/**
*
* The GroupBy list for the TopicIR
.
*
*
* @return The GroupBy list for the TopicIR
.
*/
public java.util.List getGroupByList() {
return groupByList;
}
/**
*
* The GroupBy list for the TopicIR
.
*
*
* @param groupByList
* The GroupBy list for the TopicIR
.
*/
public void setGroupByList(java.util.Collection groupByList) {
if (groupByList == null) {
this.groupByList = null;
return;
}
this.groupByList = new java.util.ArrayList(groupByList);
}
/**
*
* The GroupBy list for the TopicIR
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setGroupByList(java.util.Collection)} or {@link #withGroupByList(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param groupByList
* The GroupBy list for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withGroupByList(TopicIRGroupBy... groupByList) {
if (this.groupByList == null) {
setGroupByList(new java.util.ArrayList(groupByList.length));
}
for (TopicIRGroupBy ele : groupByList) {
this.groupByList.add(ele);
}
return this;
}
/**
*
* The GroupBy list for the TopicIR
.
*
*
* @param groupByList
* The GroupBy list for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withGroupByList(java.util.Collection groupByList) {
setGroupByList(groupByList);
return this;
}
/**
*
* The filters for the TopicIR
.
*
*
* @return The filters for the TopicIR
.
*/
public java.util.List> getFilters() {
return filters;
}
/**
*
* The filters for the TopicIR
.
*
*
* @param filters
* The filters for the TopicIR
.
*/
public void setFilters(java.util.Collection> filters) {
if (filters == null) {
this.filters = null;
return;
}
this.filters = new java.util.ArrayList>(filters);
}
/**
*
* The filters for the TopicIR
.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFilters(java.util.Collection)} or {@link #withFilters(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param filters
* The filters for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withFilters(java.util.List... filters) {
if (this.filters == null) {
setFilters(new java.util.ArrayList>(filters.length));
}
for (java.util.List ele : filters) {
this.filters.add(ele);
}
return this;
}
/**
*
* The filters for the TopicIR
.
*
*
* @param filters
* The filters for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withFilters(java.util.Collection> filters) {
setFilters(filters);
return this;
}
/**
*
* The sort for the TopicIR
.
*
*
* @param sort
* The sort for the TopicIR
.
*/
public void setSort(TopicSortClause sort) {
this.sort = sort;
}
/**
*
* The sort for the TopicIR
.
*
*
* @return The sort for the TopicIR
.
*/
public TopicSortClause getSort() {
return this.sort;
}
/**
*
* The sort for the TopicIR
.
*
*
* @param sort
* The sort for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withSort(TopicSortClause sort) {
setSort(sort);
return this;
}
/**
*
* The contribution analysis for the TopicIR
.
*
*
* @param contributionAnalysis
* The contribution analysis for the TopicIR
.
*/
public void setContributionAnalysis(TopicIRContributionAnalysis contributionAnalysis) {
this.contributionAnalysis = contributionAnalysis;
}
/**
*
* The contribution analysis for the TopicIR
.
*
*
* @return The contribution analysis for the TopicIR
.
*/
public TopicIRContributionAnalysis getContributionAnalysis() {
return this.contributionAnalysis;
}
/**
*
* The contribution analysis for the TopicIR
.
*
*
* @param contributionAnalysis
* The contribution analysis for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withContributionAnalysis(TopicIRContributionAnalysis contributionAnalysis) {
setContributionAnalysis(contributionAnalysis);
return this;
}
/**
*
* The visual for the TopicIR
.
*
*
* @param visual
* The visual for the TopicIR
.
*/
public void setVisual(VisualOptions visual) {
this.visual = visual;
}
/**
*
* The visual for the TopicIR
.
*
*
* @return The visual for the TopicIR
.
*/
public VisualOptions getVisual() {
return this.visual;
}
/**
*
* The visual for the TopicIR
.
*
*
* @param visual
* The visual for the TopicIR
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public TopicIR withVisual(VisualOptions visual) {
setVisual(visual);
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 (getMetrics() != null)
sb.append("Metrics: ").append(getMetrics()).append(",");
if (getGroupByList() != null)
sb.append("GroupByList: ").append(getGroupByList()).append(",");
if (getFilters() != null)
sb.append("Filters: ").append(getFilters()).append(",");
if (getSort() != null)
sb.append("Sort: ").append(getSort()).append(",");
if (getContributionAnalysis() != null)
sb.append("ContributionAnalysis: ").append(getContributionAnalysis()).append(",");
if (getVisual() != null)
sb.append("Visual: ").append(getVisual());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof TopicIR == false)
return false;
TopicIR other = (TopicIR) obj;
if (other.getMetrics() == null ^ this.getMetrics() == null)
return false;
if (other.getMetrics() != null && other.getMetrics().equals(this.getMetrics()) == false)
return false;
if (other.getGroupByList() == null ^ this.getGroupByList() == null)
return false;
if (other.getGroupByList() != null && other.getGroupByList().equals(this.getGroupByList()) == false)
return false;
if (other.getFilters() == null ^ this.getFilters() == null)
return false;
if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
return false;
if (other.getSort() == null ^ this.getSort() == null)
return false;
if (other.getSort() != null && other.getSort().equals(this.getSort()) == false)
return false;
if (other.getContributionAnalysis() == null ^ this.getContributionAnalysis() == null)
return false;
if (other.getContributionAnalysis() != null && other.getContributionAnalysis().equals(this.getContributionAnalysis()) == false)
return false;
if (other.getVisual() == null ^ this.getVisual() == null)
return false;
if (other.getVisual() != null && other.getVisual().equals(this.getVisual()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getMetrics() == null) ? 0 : getMetrics().hashCode());
hashCode = prime * hashCode + ((getGroupByList() == null) ? 0 : getGroupByList().hashCode());
hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
hashCode = prime * hashCode + ((getSort() == null) ? 0 : getSort().hashCode());
hashCode = prime * hashCode + ((getContributionAnalysis() == null) ? 0 : getContributionAnalysis().hashCode());
hashCode = prime * hashCode + ((getVisual() == null) ? 0 : getVisual().hashCode());
return hashCode;
}
@Override
public TopicIR clone() {
try {
return (TopicIR) 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.TopicIRMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}