code: public DescribeMetricCollectionTypesResult withGranularities(MetricGranularityType... granularities) {
          if (this.granularities == null) {
              setGranularities(new com.amazonaws.internal.SdkInternalList<MetricGranularityType>(granularities.length));
          }
          for (MetricGranularityType ele : granularities) {
              this.granularities.add(ele);
          }
          return this;
      }
docs: <p>
  The granularities for the metrics.
  </p>
  <p>
  <b>NOTE:</b> This method appends the values to the existing list (if any). Use
  {@link #setGranularities(java.util.Collection)} or {@link #withGranularities(java.util.Collection)} if you want
  to override the existing values.
  </p>
  
  @param granularities
  The granularities for the metrics.
  @return Returns a reference to this object so that method calls can be chained together.