Partilhar via


DeviceTwinInfo Class

  • java.lang.Object
    • com.azure.messaging.eventgrid.systemevents.DeviceTwinInfo

Implements

@Deprecated
public final class DeviceTwinInfo
implements JsonSerializable<DeviceTwinInfo>

Note

This class has been deprecated. This class is deprecated and may be removed in future releases. System events are now available in the azure-messaging-eventgrid-systemevents package.

Information about the device twin, which is the cloud representation of application device metadata.

Constructor Summary

Constructor Description
DeviceTwinInfo()

Creates an instance of DeviceTwinInfo class.

Method Summary

Modifier and Type Method and Description
static DeviceTwinInfo fromJson(JsonReader jsonReader)

Reads an instance of DeviceTwinInfo from the JsonReader.

String getAuthenticationType()

Get the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority.

Float getCloudToDeviceMessageCount()

Get the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device.

String getConnectionState()

Get the connectionState property: Whether the device is connected or disconnected.

String getDeviceId()

Get the deviceId property: The unique identifier of the device twin.

String getEtag()

Get the etag property: A piece of information that describes the content of the device twin.

String getLastActivityTime()

Get the lastActivityTime property: The ISO8601 timestamp of the last activity.

DeviceTwinInfoProperties getProperties()

Get the properties property: Properties JSON element.

String getStatus()

Get the status property: Whether the device twin is enabled or disabled.

String getStatusUpdateTime()

Get the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update.

Float getVersion()

Get the version property: An integer that is incremented by one each time the device twin is updated.

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.

DeviceTwinInfo setAuthenticationType(String authenticationType)

Set the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority.

DeviceTwinInfo setCloudToDeviceMessageCount(Float cloudToDeviceMessageCount)

Set the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device.

DeviceTwinInfo setConnectionState(String connectionState)

Set the connectionState property: Whether the device is connected or disconnected.

DeviceTwinInfo setDeviceId(String deviceId)

Set the deviceId property: The unique identifier of the device twin.

DeviceTwinInfo setEtag(String etag)

Set the etag property: A piece of information that describes the content of the device twin.

DeviceTwinInfo setLastActivityTime(String lastActivityTime)

Set the lastActivityTime property: The ISO8601 timestamp of the last activity.

DeviceTwinInfo setProperties(DeviceTwinInfoProperties properties)

Set the properties property: Properties JSON element.

DeviceTwinInfo setStatus(String status)

Set the status property: Whether the device twin is enabled or disabled.

DeviceTwinInfo setStatusUpdateTime(String statusUpdateTime)

Set the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update.

DeviceTwinInfo setVersion(Float version)

Set the version property: An integer that is incremented by one each time the device twin is updated.

DeviceTwinInfo setX509Thumbprint(DeviceTwinInfoX509Thumbprint x509Thumbprint)

Set the x509Thumbprint property: The thumbprint is a unique value for the x509 certificate, commonly used to find a particular certificate in a certificate store.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

DeviceTwinInfo

public DeviceTwinInfo()

Creates an instance of DeviceTwinInfo class.

Method Details

fromJson

public static DeviceTwinInfo fromJson(JsonReader jsonReader)

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:

IOException

- If an error occurs while reading the DeviceTwinInfo.

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 Float 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 Float 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.

setAuthenticationType

public DeviceTwinInfo setAuthenticationType(String authenticationType)

Set the authenticationType property: Authentication type used for this device: either SAS, SelfSigned, or CertificateAuthority.

Parameters:

authenticationType - the authenticationType value to set.

Returns:

the DeviceTwinInfo object itself.

setCloudToDeviceMessageCount

public DeviceTwinInfo setCloudToDeviceMessageCount(Float cloudToDeviceMessageCount)

Set the cloudToDeviceMessageCount property: Count of cloud to device messages sent to this device.

Parameters:

cloudToDeviceMessageCount - the cloudToDeviceMessageCount value to set.

Returns:

the DeviceTwinInfo object itself.

setConnectionState

public DeviceTwinInfo setConnectionState(String connectionState)

Set the connectionState property: Whether the device is connected or disconnected.

Parameters:

connectionState - the connectionState value to set.

Returns:

the DeviceTwinInfo object itself.

setDeviceId

public DeviceTwinInfo setDeviceId(String deviceId)

Set the deviceId property: The unique identifier of the device twin.

Parameters:

deviceId - the deviceId value to set.

Returns:

the DeviceTwinInfo object itself.

setEtag

public DeviceTwinInfo setEtag(String etag)

Set 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.

Parameters:

etag - the etag value to set.

Returns:

the DeviceTwinInfo object itself.

setLastActivityTime

public DeviceTwinInfo setLastActivityTime(String lastActivityTime)

Set the lastActivityTime property: The ISO8601 timestamp of the last activity.

Parameters:

lastActivityTime - the lastActivityTime value to set.

Returns:

the DeviceTwinInfo object itself.

setProperties

public DeviceTwinInfo setProperties(DeviceTwinInfoProperties properties)

Set the properties property: Properties JSON element.

Parameters:

properties - the properties value to set.

Returns:

the DeviceTwinInfo object itself.

setStatus

public DeviceTwinInfo setStatus(String status)

Set the status property: Whether the device twin is enabled or disabled.

Parameters:

status - the status value to set.

Returns:

the DeviceTwinInfo object itself.

setStatusUpdateTime

public DeviceTwinInfo setStatusUpdateTime(String statusUpdateTime)

Set the statusUpdateTime property: The ISO8601 timestamp of the last device twin status update.

Parameters:

statusUpdateTime - the statusUpdateTime value to set.

Returns:

the DeviceTwinInfo object itself.

setVersion

public DeviceTwinInfo setVersion(Float version)

Set the version property: An integer that is incremented by one each time the device twin is updated.

Parameters:

version - the version value to set.

Returns:

the DeviceTwinInfo object itself.

setX509Thumbprint

public DeviceTwinInfo setX509Thumbprint(DeviceTwinInfoX509Thumbprint x509Thumbprint)

Set 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.

Parameters:

x509Thumbprint - the x509Thumbprint value to set.

Returns:

the DeviceTwinInfo object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to