/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.iotsitewise.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Contains a tumbling window, which is a repeating fixed-sized, non-overlapping, and contiguous time window. You can * use this window in metrics to aggregate data from properties and other assets. *

*

* You can use m, h, d, and w when you specify an interval or * offset. Note that m represents minutes, h represents hours, d represents days, * and w represents weeks. You can also use s to represent seconds in offset. *

*

* The interval and offset parameters support the ISO 8601 format. For example, PT5S represents 5 * seconds, PT5M represents 5 minutes, and PT5H represents 5 hours. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TumblingWindow implements Serializable, Cloneable, StructuredPojo { /** *

* The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. *

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of * each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the * end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval. *

*/ private String interval; /** *

* The offset for the tumbling window. The offset parameter accepts the following: *

* */ private String offset; /** *

* The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. *

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of * each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the * end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval. *

* * @param interval * The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the end * of each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive * and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the * interval. */ public void setInterval(String interval) { this.interval = interval; } /** *

* The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. *

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of * each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the * end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval. *

* * @return The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the * end of each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive * and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the * interval. */ public String getInterval() { return this.interval; } /** *

* The time interval for the tumbling window. The interval time must be between 1 minute and 1 week. *

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the end of * each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive and the * end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the interval. *

* * @param interval * The time interval for the tumbling window. The interval time must be between 1 minute and 1 week.

*

* IoT SiteWise computes the 1w interval the end of Sunday at midnight each week (UTC), the * 1d interval at the end of each day at midnight (UTC), the 1h interval at the end * of each hour, and so on. *

*

* When IoT SiteWise aggregates data points for metric computations, the start of each interval is exclusive * and the end of each interval is inclusive. IoT SiteWise places the computed data point at the end of the * interval. * @return Returns a reference to this object so that method calls can be chained together. */ public TumblingWindow withInterval(String interval) { setInterval(interval); return this; } /** *

* The offset for the tumbling window. The offset parameter accepts the following: *

* * * @param offset * The offset for the tumbling window. The offset parameter accepts the following:

*