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 Type
    Method
    Description
    fromJson(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.
    double
    Get 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.
    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.
    double
    Get 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.JsonWriter
    toJson(com.azure.json.JsonWriter jsonWriter)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.azure.json.JsonSerializable

    toJson, toJson, toJsonBytes, toJsonString
  • Method Details

    • getAuthenticationType

      public String 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

      public String getConnectionState()
      Get the connectionState property: Whether the device is connected or disconnected.
      Returns:
      the connectionState value.
    • getDeviceId

      public String getDeviceId()
      Get the deviceId property: The unique identifier of the device twin.
      Returns:
      the deviceId value.
    • getEtag

      public String 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

      public String getLastActivityTime()
      Get the lastActivityTime property: The ISO8601 timestamp of the last activity.
      Returns:
      the lastActivityTime value.
    • getProperties

      public DeviceTwinInfoProperties getProperties()
      Get the properties property: Properties JSON element.
      Returns:
      the properties value.
    • getStatus

      public String getStatus()
      Get the status property: Whether the device twin is enabled or disabled.
      Returns:
      the status value.
    • getStatusUpdateTime

      public String 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

      public DeviceTwinInfoX509Thumbprint 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DeviceTwinInfo>
      Throws:
      IOException
    • fromJson

      public static DeviceTwinInfo fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      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.