/* * Copyright 2010-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.geo.model; import java.io.Serializable; import com.amazonaws.AmazonWebServiceRequest; /** *

* Retrieves the device position history from a tracker resource within a * specified range of time. *

* *

* Device positions are deleted after 30 days. *

*
*/ public class GetDevicePositionHistoryRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The device whose position history you want to retrieve. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
*/ private String deviceId; /** *

* Specify the end time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be the time that the request is made. *

*

* Requirement: *

* */ private java.util.Date endTimeExclusive; /** *

* An optional limit for the number of device positions returned in a single * call. *

*

* Default value: 100 *

*

* Constraints:
* Range: 1 - 100
*/ private Integer maxResults; /** *

* The pagination token specifying which page of results to return in the * response. If no token is provided, the default page is the first page. *

*

* Default value: null *

*

* Constraints:
* Length: 1 - 2000
*/ private String nextToken; /** *

* Specify the start time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be 24 hours prior to the time that the request is made. *

*

* Requirement: *

* */ private java.util.Date startTimeInclusive; /** *

* The tracker resource receiving the request for the device position * history. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
*/ private String trackerName; /** *

* The device whose position history you want to retrieve. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
* * @return

* The device whose position history you want to retrieve. *

*/ public String getDeviceId() { return deviceId; } /** *

* The device whose position history you want to retrieve. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
* * @param deviceId

* The device whose position history you want to retrieve. *

*/ public void setDeviceId(String deviceId) { this.deviceId = deviceId; } /** *

* The device whose position history you want to retrieve. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
* * @param deviceId

* The device whose position history you want to retrieve. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetDevicePositionHistoryRequest withDeviceId(String deviceId) { this.deviceId = deviceId; return this; } /** *

* Specify the end time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be the time that the request is made. *

*

* Requirement: *

* * * @return

* Specify the end time for the position history in * ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By * default, the value will be the time that the request is made. *

*

* Requirement: *

* */ public java.util.Date getEndTimeExclusive() { return endTimeExclusive; } /** *

* Specify the end time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be the time that the request is made. *

*

* Requirement: *

* * * @param endTimeExclusive

* Specify the end time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By * default, the value will be the time that the request is made. *

*

* Requirement: *

* */ public void setEndTimeExclusive(java.util.Date endTimeExclusive) { this.endTimeExclusive = endTimeExclusive; } /** *

* Specify the end time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be the time that the request is made. *

*

* Requirement: *

* *

* Returns a reference to this object so that method calls can be chained * together. * * @param endTimeExclusive

* Specify the end time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By * default, the value will be the time that the request is made. *

*

* Requirement: *

* * @return A reference to this updated object so that method calls can be * chained together. */ public GetDevicePositionHistoryRequest withEndTimeExclusive(java.util.Date endTimeExclusive) { this.endTimeExclusive = endTimeExclusive; return this; } /** *

* An optional limit for the number of device positions returned in a single * call. *

*

* Default value: 100 *

*

* Constraints:
* Range: 1 - 100
* * @return

* An optional limit for the number of device positions returned in * a single call. *

*

* Default value: 100 *

*/ public Integer getMaxResults() { return maxResults; } /** *

* An optional limit for the number of device positions returned in a single * call. *

*

* Default value: 100 *

*

* Constraints:
* Range: 1 - 100
* * @param maxResults

* An optional limit for the number of device positions returned * in a single call. *

*

* Default value: 100 *

*/ public void setMaxResults(Integer maxResults) { this.maxResults = maxResults; } /** *

* An optional limit for the number of device positions returned in a single * call. *

*

* Default value: 100 *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 1 - 100
* * @param maxResults

* An optional limit for the number of device positions returned * in a single call. *

*

* Default value: 100 *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetDevicePositionHistoryRequest withMaxResults(Integer maxResults) { this.maxResults = maxResults; return this; } /** *

* The pagination token specifying which page of results to return in the * response. If no token is provided, the default page is the first page. *

*

* Default value: null *

*

* Constraints:
* Length: 1 - 2000
* * @return

* The pagination token specifying which page of results to return * in the response. If no token is provided, the default page is the * first page. *

*

* Default value: null *

*/ public String getNextToken() { return nextToken; } /** *

* The pagination token specifying which page of results to return in the * response. If no token is provided, the default page is the first page. *

*

* Default value: null *

*

* Constraints:
* Length: 1 - 2000
* * @param nextToken

* The pagination token specifying which page of results to * return in the response. If no token is provided, the default * page is the first page. *

*

* Default value: null *

*/ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** *

* The pagination token specifying which page of results to return in the * response. If no token is provided, the default page is the first page. *

*

* Default value: null *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 2000
* * @param nextToken

* The pagination token specifying which page of results to * return in the response. If no token is provided, the default * page is the first page. *

*

* Default value: null *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetDevicePositionHistoryRequest withNextToken(String nextToken) { this.nextToken = nextToken; return this; } /** *

* Specify the start time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be 24 hours prior to the time that the request is made. *

*

* Requirement: *

* * * @return

* Specify the start time for the position history in * ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By * default, the value will be 24 hours prior to the time that the * request is made. *

*

* Requirement: *

* */ public java.util.Date getStartTimeInclusive() { return startTimeInclusive; } /** *

* Specify the start time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be 24 hours prior to the time that the request is made. *

*

* Requirement: *

* * * @param startTimeInclusive

* Specify the start time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By * default, the value will be 24 hours prior to the time that the * request is made. *

*

* Requirement: *

* */ public void setStartTimeInclusive(java.util.Date startTimeInclusive) { this.startTimeInclusive = startTimeInclusive; } /** *

* Specify the start time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the * value will be 24 hours prior to the time that the request is made. *

*

* Requirement: *

* *

* Returns a reference to this object so that method calls can be chained * together. * * @param startTimeInclusive

* Specify the start time for the position history in ISO * 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By * default, the value will be 24 hours prior to the time that the * request is made. *

*

* Requirement: *

* * @return A reference to this updated object so that method calls can be * chained together. */ public GetDevicePositionHistoryRequest withStartTimeInclusive(java.util.Date startTimeInclusive) { this.startTimeInclusive = startTimeInclusive; return this; } /** *

* The tracker resource receiving the request for the device position * history. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @return

* The tracker resource receiving the request for the device * position history. *

*/ public String getTrackerName() { return trackerName; } /** *

* The tracker resource receiving the request for the device position * history. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @param trackerName

* The tracker resource receiving the request for the device * position history. *

*/ public void setTrackerName(String trackerName) { this.trackerName = trackerName; } /** *

* The tracker resource receiving the request for the device position * history. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\w]+$
* * @param trackerName

* The tracker resource receiving the request for the device * position history. *

* @return A reference to this updated object so that method calls can be * chained together. */ public GetDevicePositionHistoryRequest withTrackerName(String trackerName) { this.trackerName = trackerName; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDeviceId() != null) sb.append("DeviceId: " + getDeviceId() + ","); if (getEndTimeExclusive() != null) sb.append("EndTimeExclusive: " + getEndTimeExclusive() + ","); if (getMaxResults() != null) sb.append("MaxResults: " + getMaxResults() + ","); if (getNextToken() != null) sb.append("NextToken: " + getNextToken() + ","); if (getStartTimeInclusive() != null) sb.append("StartTimeInclusive: " + getStartTimeInclusive() + ","); if (getTrackerName() != null) sb.append("TrackerName: " + getTrackerName()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode()); hashCode = prime * hashCode + ((getEndTimeExclusive() == null) ? 0 : getEndTimeExclusive().hashCode()); hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); hashCode = prime * hashCode + ((getStartTimeInclusive() == null) ? 0 : getStartTimeInclusive().hashCode()); hashCode = prime * hashCode + ((getTrackerName() == null) ? 0 : getTrackerName().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetDevicePositionHistoryRequest == false) return false; GetDevicePositionHistoryRequest other = (GetDevicePositionHistoryRequest) obj; if (other.getDeviceId() == null ^ this.getDeviceId() == null) return false; if (other.getDeviceId() != null && other.getDeviceId().equals(this.getDeviceId()) == false) return false; if (other.getEndTimeExclusive() == null ^ this.getEndTimeExclusive() == null) return false; if (other.getEndTimeExclusive() != null && other.getEndTimeExclusive().equals(this.getEndTimeExclusive()) == false) return false; if (other.getMaxResults() == null ^ this.getMaxResults() == null) return false; if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; if (other.getStartTimeInclusive() == null ^ this.getStartTimeInclusive() == null) return false; if (other.getStartTimeInclusive() != null && other.getStartTimeInclusive().equals(this.getStartTimeInclusive()) == false) return false; if (other.getTrackerName() == null ^ this.getTrackerName() == null) return false; if (other.getTrackerName() != null && other.getTrackerName().equals(this.getTrackerName()) == false) return false; return true; } }