public Metric withWindow(MetricWindow window) {
        setWindow(window);
        return this;
    }
<p>
The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT SiteWise
computes one data point per <code>window</code>.
</p>

@param window
       The window (time interval) over which IoT SiteWise computes the metric's aggregation expression. IoT
       SiteWise computes one data point per <code>window</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iotsitewise/src/main/java/com/amazonaws/services/iotsitewise/model/Metric.java