List of usage examples for com.amazonaws.services.cognitoidp.model DeviceType getDeviceAttributes
public java.util.List<AttributeType> getDeviceAttributes()
The device attributes.
From source file:io.fineo.client.auth.cognito.CognitoDevice.java
License:Open Source License
/** * Constructs a {@link CognitoDevice} object with {@link DeviceType} object. * * @param device REQUIRED: A {@link DeviceType} object. * @param user REQUIRED: The {@link CognitoUser} this device is linked to. *///from w ww. j av a2 s. c o m public CognitoDevice(DeviceType device, CognitoUser user) { this.deviceKey = device.getDeviceKey(); this.deviceAttributes = new CognitoUserAttributes(device.getDeviceAttributes()); this.createDate = device.getDeviceCreateDate(); this.lastModifiedDate = device.getDeviceLastModifiedDate(); this.lastAccessedDate = device.getDeviceLastModifiedDate(); this.user = user; }
From source file:io.fineo.client.auth.cognito.CognitoDevice.java
License:Open Source License
/** * Internal method to update this object. * * @param device REQUIRED: {@link DeviceType} returned from the service. *//*from w ww . jav a2s . co m*/ private void updateThis(DeviceType device) { if (device == null) { throw new CognitoInternalErrorException("Service returned null object, this object was not updated"); } if (!device.getDeviceKey().equals(this.deviceKey)) { throw new CognitoInternalErrorException("Service error, this object was not updated"); } this.deviceAttributes = new CognitoUserAttributes(device.getDeviceAttributes()); this.lastModifiedDate = device.getDeviceLastModifiedDate(); this.lastAccessedDate = device.getDeviceLastModifiedDate(); }