com.amazonaws.services.quicksight.model.DateTimeHierarchy 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 option that determines the hierarchy of any DateTime
fields.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DateTimeHierarchy implements Serializable, Cloneable, StructuredPojo {
/**
*
* The hierarchy ID of the DateTime
hierarchy.
*
*/
private String hierarchyId;
/**
*
* The option that determines the drill down filters for the DateTime
hierarchy.
*
*/
private java.util.List drillDownFilters;
/**
*
* The hierarchy ID of the DateTime
hierarchy.
*
*
* @param hierarchyId
* The hierarchy ID of the DateTime
hierarchy.
*/
public void setHierarchyId(String hierarchyId) {
this.hierarchyId = hierarchyId;
}
/**
*
* The hierarchy ID of the DateTime
hierarchy.
*
*
* @return The hierarchy ID of the DateTime
hierarchy.
*/
public String getHierarchyId() {
return this.hierarchyId;
}
/**
*
* The hierarchy ID of the DateTime
hierarchy.
*
*
* @param hierarchyId
* The hierarchy ID of the DateTime
hierarchy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DateTimeHierarchy withHierarchyId(String hierarchyId) {
setHierarchyId(hierarchyId);
return this;
}
/**
*
* The option that determines the drill down filters for the DateTime
hierarchy.
*
*
* @return The option that determines the drill down filters for the DateTime
hierarchy.
*/
public java.util.List getDrillDownFilters() {
return drillDownFilters;
}
/**
*
* The option that determines the drill down filters for the DateTime
hierarchy.
*
*
* @param drillDownFilters
* The option that determines the drill down filters for the DateTime
hierarchy.
*/
public void setDrillDownFilters(java.util.Collection drillDownFilters) {
if (drillDownFilters == null) {
this.drillDownFilters = null;
return;
}
this.drillDownFilters = new java.util.ArrayList(drillDownFilters);
}
/**
*
* The option that determines the drill down filters for the DateTime
hierarchy.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setDrillDownFilters(java.util.Collection)} or {@link #withDrillDownFilters(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param drillDownFilters
* The option that determines the drill down filters for the DateTime
hierarchy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DateTimeHierarchy withDrillDownFilters(DrillDownFilter... drillDownFilters) {
if (this.drillDownFilters == null) {
setDrillDownFilters(new java.util.ArrayList(drillDownFilters.length));
}
for (DrillDownFilter ele : drillDownFilters) {
this.drillDownFilters.add(ele);
}
return this;
}
/**
*
* The option that determines the drill down filters for the DateTime
hierarchy.
*
*
* @param drillDownFilters
* The option that determines the drill down filters for the DateTime
hierarchy.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DateTimeHierarchy withDrillDownFilters(java.util.Collection drillDownFilters) {
setDrillDownFilters(drillDownFilters);
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 (getHierarchyId() != null)
sb.append("HierarchyId: ").append(getHierarchyId()).append(",");
if (getDrillDownFilters() != null)
sb.append("DrillDownFilters: ").append(getDrillDownFilters());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DateTimeHierarchy == false)
return false;
DateTimeHierarchy other = (DateTimeHierarchy) obj;
if (other.getHierarchyId() == null ^ this.getHierarchyId() == null)
return false;
if (other.getHierarchyId() != null && other.getHierarchyId().equals(this.getHierarchyId()) == false)
return false;
if (other.getDrillDownFilters() == null ^ this.getDrillDownFilters() == null)
return false;
if (other.getDrillDownFilters() != null && other.getDrillDownFilters().equals(this.getDrillDownFilters()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getHierarchyId() == null) ? 0 : getHierarchyId().hashCode());
hashCode = prime * hashCode + ((getDrillDownFilters() == null) ? 0 : getDrillDownFilters().hashCode());
return hashCode;
}
@Override
public DateTimeHierarchy clone() {
try {
return (DateTimeHierarchy) 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.DateTimeHierarchyMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}