public class TwinMetadata
extends java.lang.Object
TwinCollection.
The metadata is a set of pairs lastUpdated/lastUpdatedVersion for each property and sub-property in the Twin. It is optionally provided by the service and the clients can only ready it.
This class store the Date and Version for each entity in the TwinCollection.
For instance, the following is a valid TwinCollection with its metadata.
"$metadata":{
"$lastUpdated":"2017-09-21T02:07:44.238Z",
"$lastUpdatedVersion":4,
"MaxSpeed":{
"$lastUpdated":"2017-09-21T02:07:44.238Z",
"$lastUpdatedVersion":3,
"$lastUpdatedBy": "newconfig",
"$lastUpdatedByDigest": "637570574076206429",
"Value":{
"$lastUpdated":"2017-09-21T02:07:44.238Z",
"$lastUpdatedVersion":5
},
"NewValue":{
"$lastUpdated":"2017-09-21T02:07:44.238Z",
"$lastUpdatedVersion":5
}
}
}
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LAST_UPDATE_TAG |
static java.lang.String |
LAST_UPDATE_VERSION_TAG |
static java.lang.String |
LAST_UPDATED_BY |
static java.lang.String |
LAST_UPDATED_BY_DIGEST |
| Modifier and Type | Method and Description |
|---|---|
java.util.Date |
getLastUpdated()
Getter for lastUpdated.
|
java.lang.String |
getLastUpdatedBy()
Getter for lastUpdatedBy.
|
java.lang.String |
getLastUpdatedByDigest()
Getter for lastUpdatedByDigest.
|
java.lang.Integer |
getLastUpdatedVersion()
Getter for lastUpdatedVersion.
|
java.lang.String |
toString()
Creates a pretty print JSON with the content of this class and subclasses.
|
public static final java.lang.String LAST_UPDATE_TAG
public static final java.lang.String LAST_UPDATE_VERSION_TAG
public static final java.lang.String LAST_UPDATED_BY
public static final java.lang.String LAST_UPDATED_BY_DIGEST
public java.lang.String getLastUpdatedBy()
String representing the configuration LastUpdatedBy.public java.lang.String getLastUpdatedByDigest()
String with the stored lastUpdatedByDigest.public java.lang.Integer getLastUpdatedVersion()
Integer with the stored lastUpdatedVersion. It can be null.public java.util.Date getLastUpdated()
Date with the stored lastUpdated. It can be null.public java.lang.String toString()
toString in class java.lang.ObjectString with the pretty print JSON.Copyright © 2023. All rights reserved.