Class DeviceTwinInfo
java.lang.Object
com.azure.messaging.eventgrid.systemevents.DeviceTwinInfo
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DeviceTwinInfo>
public final class DeviceTwinInfo
extends Object
implements com.azure.json.JsonSerializable<DeviceTwinInfo>
Information about the device twin, which is the cloud representation of application device metadata.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeviceTwinInfofromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DeviceTwinInfo from the JsonReader.Get the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority.doubleGet the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device.Get the connectionState property: Whether the device is connected or disconnected.Get the deviceId property: The unique identifier of the device twin.getEtag()Get the etag property: A piece of information that describes the content of the device twin.Get the lastActivityTime property: The ISO8601 timestamp of the last activity.Get the properties property: Properties JSON element.Get the status property: Whether the device twin is enabled or disabled.Get the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update.doubleGet the version property: An integer that is incremented by one each time the device twin is updated.Get the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Method Details
-
getAuthenticationType
Get the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority.- Returns:
- the authenticationType value.
-
getCloudToDeviceMessageCount
public double getCloudToDeviceMessageCount()Get the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device.- Returns:
- the cloudToDeviceMessageCount value.
-
getConnectionState
Get the connectionState property: Whether the device is connected or disconnected.- Returns:
- the connectionState value.
-
getDeviceId
Get the deviceId property: The unique identifier of the device twin.- Returns:
- the deviceId value.
-
getEtag
Get the etag property: A piece of information that describes the content of the device twin. Each etag is guaranteed to be unique per device twin.- Returns:
- the etag value.
-
getLastActivityTime
Get the lastActivityTime property: The ISO8601 timestamp of the last activity.- Returns:
- the lastActivityTime value.
-
getProperties
Get the properties property: Properties JSON element.- Returns:
- the properties value.
-
getStatus
Get the status property: Whether the device twin is enabled or disabled.- Returns:
- the status value.
-
getStatusUpdateTime
Get the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update.- Returns:
- the statusUpdateTime value.
-
getVersion
public double getVersion()Get the version property: An integer that is incremented by one each time the device twin is updated.- Returns:
- the version value.
-
getX509Thumbprint
Get the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store. The thumbprint is dynamically generated using the SHA1 algorithm, and does not physically exist in the certificate.- Returns:
- the x509Thumbprint value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DeviceTwinInfo>- Throws:
IOException
-
fromJson
Reads an instance of DeviceTwinInfo from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DeviceTwinInfo if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the DeviceTwinInfo.
-