public MetricInterval withEndTime(java.util.Date endTime) {
        setEndTime(endTime);
        return this;
    }
<p>
The timestamp, in UNIX Epoch time format. End time is based on the interval period selected. For example, If
<code>IntervalPeriod</code> is selected <code>THIRTY_MIN</code>, <code>StartTime</code> and <code>EndTime</code>
in the API request differs by 1 day, then 48 results are returned in the response. Each result is aggregated by
the 30 minutes period, with each <code>StartTime</code> and <code>EndTime</code> differing by 30 minutes.
</p>

@param endTime
       The timestamp, in UNIX Epoch time format. End time is based on the interval period selected. For example,
       If <code>IntervalPeriod</code> is selected <code>THIRTY_MIN</code>, <code>StartTime</code> and
       <code>EndTime</code> in the API request differs by 1 day, then 48 results are returned in the response.
       Each result is aggregated by the 30 minutes period, with each <code>StartTime</code> and
       <code>EndTime</code> differing by 30 minutes.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/MetricInterval.java