com.amazonaws.services.location.model.GetDevicePositionHistoryRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-location Show documentation
/*
* Copyright 2019-2024 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.location.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetDevicePositionHistoryRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The tracker resource receiving the request for the device position history.
*
*/
private String trackerName;
/**
*
* The device whose position history you want to retrieve.
*
*/
private String deviceId;
/**
*
* 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
*
*/
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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
*
*/
private java.util.Date startTimeInclusive;
/**
*
* 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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for StartTimeInclusive
.
*
*
*
*/
private java.util.Date endTimeExclusive;
/**
*
* An optional limit for the number of device positions returned in a single call.
*
*
* Default value: 100
*
*/
private Integer maxResults;
/**
*
* The tracker resource receiving the request for the device position history.
*
*
* @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.
*
*
* @return The tracker resource receiving the request for the device position history.
*/
public String getTrackerName() {
return this.trackerName;
}
/**
*
* The tracker resource receiving the request for the device position history.
*
*
* @param trackerName
* The tracker resource receiving the request for the device position history.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDevicePositionHistoryRequest withTrackerName(String trackerName) {
setTrackerName(trackerName);
return this;
}
/**
*
* The device whose position history you want to retrieve.
*
*
* @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.
*
*
* @return The device whose position history you want to retrieve.
*/
public String getDeviceId() {
return this.deviceId;
}
/**
*
* The device whose position history you want to retrieve.
*
*
* @param deviceId
* The device whose position history you want to retrieve.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDevicePositionHistoryRequest withDeviceId(String deviceId) {
setDeviceId(deviceId);
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
*
*
* @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
*
*
* @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 this.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
*
*
* @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 Returns a reference to this object so that method calls can be chained together.
*/
public GetDevicePositionHistoryRequest withNextToken(String nextToken) {
setNextToken(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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
*
*
* @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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
*/
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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
*
*
* @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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
*/
public java.util.Date getStartTimeInclusive() {
return this.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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
*
*
* @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:
*
*
* -
*
* The time specified for StartTimeInclusive
must be before EndTimeExclusive
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDevicePositionHistoryRequest withStartTimeInclusive(java.util.Date startTimeInclusive) {
setStartTimeInclusive(startTimeInclusive);
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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for StartTimeInclusive
.
*
*
*
*
* @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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for
* StartTimeInclusive
.
*
*
*/
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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for StartTimeInclusive
.
*
*
*
*
* @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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for
* StartTimeInclusive
.
*
*
*/
public java.util.Date getEndTimeExclusive() {
return this.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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for StartTimeInclusive
.
*
*
*
*
* @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:
*
*
* -
*
* The time specified for EndTimeExclusive
must be after the time for
* StartTimeInclusive
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDevicePositionHistoryRequest withEndTimeExclusive(java.util.Date endTimeExclusive) {
setEndTimeExclusive(endTimeExclusive);
return this;
}
/**
*
* An optional limit for the number of device positions returned in a single call.
*
*
* Default value: 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
*
*
* @return An optional limit for the number of device positions returned in a single call.
*
* Default value: 100
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* An optional limit for the number of device positions returned in a single call.
*
*
* Default value: 100
*
*
* @param maxResults
* An optional limit for the number of device positions returned in a single call.
*
* Default value: 100
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetDevicePositionHistoryRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getTrackerName() != null)
sb.append("TrackerName: ").append(getTrackerName()).append(",");
if (getDeviceId() != null)
sb.append("DeviceId: ").append(getDeviceId()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getStartTimeInclusive() != null)
sb.append("StartTimeInclusive: ").append(getStartTimeInclusive()).append(",");
if (getEndTimeExclusive() != null)
sb.append("EndTimeExclusive: ").append(getEndTimeExclusive()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults());
sb.append("}");
return sb.toString();
}
@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.getTrackerName() == null ^ this.getTrackerName() == null)
return false;
if (other.getTrackerName() != null && other.getTrackerName().equals(this.getTrackerName()) == false)
return false;
if (other.getDeviceId() == null ^ this.getDeviceId() == null)
return false;
if (other.getDeviceId() != null && other.getDeviceId().equals(this.getDeviceId()) == 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.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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTrackerName() == null) ? 0 : getTrackerName().hashCode());
hashCode = prime * hashCode + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getStartTimeInclusive() == null) ? 0 : getStartTimeInclusive().hashCode());
hashCode = prime * hashCode + ((getEndTimeExclusive() == null) ? 0 : getEndTimeExclusive().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
return hashCode;
}
@Override
public GetDevicePositionHistoryRequest clone() {
return (GetDevicePositionHistoryRequest) super.clone();
}
}