public ExcludePeriodConfiguration withGranularity(TimeGranularity granularity) {
        this.granularity = granularity.toString();
        return this;
    }
<p>
The granularity or unit (day, month, year) of the exclude period.
</p>

@param granularity
       The granularity or unit (day, month, year) of the exclude period.
@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/ExcludePeriodConfiguration.java