public MetricInterval withInterval(IntervalPeriod interval) {
        this.interval = interval.toString();
        return this;
    }
<p>
The interval period provided in the API request.
</p>

@param interval
       The interval period provided in the API request.
@return Returns a reference to this object so that method calls can be chained together.
@see IntervalPeriod
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/MetricInterval.java