public AggregationPartitionBy withTimeGranularity(TimeGranularity timeGranularity) {
        this.timeGranularity = timeGranularity.toString();
        return this;
    }
<p>
The <code>TimeGranularity</code> for an <code>AggregationPartitionBy</code>.
</p>

@param timeGranularity
       The <code>TimeGranularity</code> for an <code>AggregationPartitionBy</code>.
@return Returns a reference to this object so that method calls can be chained together.
@see TimeGranularity
aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/AggregationPartitionBy.java