Example usage for com.amazonaws.services.cognitoidp.model DeviceType getDeviceLastModifiedDate

List of usage examples for com.amazonaws.services.cognitoidp.model DeviceType getDeviceLastModifiedDate

Introduction

In this page you can find the example usage for com.amazonaws.services.cognitoidp.model DeviceType getDeviceLastModifiedDate.

Prototype


public java.util.Date getDeviceLastModifiedDate() 

Source Link

Document

The last modified date of the device.

Usage

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 a2s .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   www .j av  a  2  s. c  o  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();
}