/* * 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; /** *
* Contains the position update details for a device. *
*/ public class DevicePositionUpdate implements Serializable { /** ** The accuracy of the device position. *
*/ private PositionalAccuracy accuracy; /** ** The device associated to the position update. *
*
* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
*/
private String deviceId;
/**
*
* The latest device position defined in WGS 84 format: [X or longitude, Y or latitude]
.
*
* Associates one of more properties with the position update. A property is * a key-value pair stored with the position update and added to any * geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* The timestamp at which the device's position was determined. Uses ISO
* 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
*
* The accuracy of the device position. *
* * @return* The accuracy of the device position. *
*/ public PositionalAccuracy getAccuracy() { return accuracy; } /** ** The accuracy of the device position. *
* * @param accuracy* The accuracy of the device position. *
*/ public void setAccuracy(PositionalAccuracy accuracy) { this.accuracy = accuracy; } /** ** The accuracy of the device position. *
** Returns a reference to this object so that method calls can be chained * together. * * @param accuracy
* The accuracy of the device position. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DevicePositionUpdate withAccuracy(PositionalAccuracy accuracy) { this.accuracy = accuracy; return this; } /** ** The device associated to the position update. *
*
* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
*
* @return
* The device associated to the position update. *
*/ public String getDeviceId() { return deviceId; } /** ** The device associated to the position update. *
*
* Constraints:
* Length: 1 - 100
* Pattern: ^[-._\p{L}\p{N}]+$
*
* @param deviceId
* The device associated to the position update. *
*/ public void setDeviceId(String deviceId) { this.deviceId = deviceId; } /** ** The device associated to the position update. *
** 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 associated to the position update. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DevicePositionUpdate withDeviceId(String deviceId) { this.deviceId = deviceId; return this; } /** *
* The latest device position defined in WGS 84 format: [X or longitude, Y or latitude]
.
*
* The latest device position defined in WGS 84 format: [X or longitude, Y or latitude]
.
*
* The latest device position defined in WGS 84 format: [X or longitude, Y or latitude]
.
*
* The latest device position defined in WGS 84 format:
* [X or longitude, Y or latitude]
.
*
* The latest device position defined in WGS 84 format: [X or longitude, Y or latitude]
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param position
* The latest device position defined in WGS 84 format:
* [X or longitude, Y or latitude]
.
*
* The latest device position defined in WGS 84 format: [X or longitude, Y or latitude]
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param position
* The latest device position defined in WGS 84 format:
* [X or longitude, Y or latitude]
.
*
* Associates one of more properties with the position update. A property is * a key-value pair stored with the position update and added to any * geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* Associates one of more properties with the position update. A * property is a key-value pair stored with the position update and * added to any geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* Associates one of more properties with the position update. A property is * a key-value pair stored with the position update and added to any * geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* Associates one of more properties with the position update. A * property is a key-value pair stored with the position update * and added to any geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* Associates one of more properties with the position update. A property is * a key-value pair stored with the position update and added to any * geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* Returns a reference to this object so that method calls can be chained * together. * * @param positionProperties
* Associates one of more properties with the position update. A * property is a key-value pair stored with the position update * and added to any geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* Associates one of more properties with the position update. A property is * a key-value pair stored with the position update and added to any * geofence event the update may trigger. *
*
* Format: "key" : "value"
*
* The method adds a new key-value pair into PositionProperties parameter,
* and returns a reference to this object so that method calls can be
* chained together.
*
* @param key The key of the entry to be added into PositionProperties.
* @param value The corresponding value of the entry to be added into
* PositionProperties.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public DevicePositionUpdate addPositionPropertiesEntry(String key, String value) {
if (null == this.positionProperties) {
this.positionProperties = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public DevicePositionUpdate clearPositionPropertiesEntries() {
this.positionProperties = null;
return this;
}
/**
*
* The timestamp at which the device's position was determined. Uses ISO
* 8601 format:
* The timestamp at which the device's position was determined. Uses
*
* ISO 8601 format:
* The timestamp at which the device's position was determined. Uses ISO
* 8601 format:
* The timestamp at which the device's position was determined.
* Uses ISO
* 8601 format:
* The timestamp at which the device's position was determined. Uses ISO
* 8601 format:
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param sampleTime
* The timestamp at which the device's position was determined.
* Uses ISO
* 8601 format: YYYY-MM-DDThh:mm:ss.sssZ
* YYYY-MM-DDThh:mm:ss.sssZ
* YYYY-MM-DDThh:mm:ss.sssZ
* YYYY-MM-DDThh:mm:ss.sssZ
* YYYY-MM-DDThh:mm:ss.sssZ
* YYYY-MM-DDThh:mm:ss.sssZ
*