Partilhar via


DeviceLifeCycleEventProperties Class

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

Implements

@Deprecated
public class DeviceLifeCycleEventProperties
implements JsonSerializable<DeviceLifeCycleEventProperties>

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.

Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted).

Constructor Summary

Constructor Description
DeviceLifeCycleEventProperties()

Creates an instance of DeviceLifeCycleEventProperties class.

Method Summary

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

Reads an instance of DeviceLifeCycleEventProperties from the JsonReader.

String getDeviceId()

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

String getHubName()

Get the hubName property: Name of the IoT Hub where the device was created or deleted.

DeviceTwinInfo getTwin()

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

DeviceLifeCycleEventProperties setDeviceId(String deviceId)

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

DeviceLifeCycleEventProperties setHubName(String hubName)

Set the hubName property: Name of the IoT Hub where the device was created or deleted.

DeviceLifeCycleEventProperties setTwin(DeviceTwinInfo twin)

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

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

DeviceLifeCycleEventProperties

public DeviceLifeCycleEventProperties()

Creates an instance of DeviceLifeCycleEventProperties class.

Method Details

fromJson

public static DeviceLifeCycleEventProperties fromJson(JsonReader jsonReader)

Reads an instance of DeviceLifeCycleEventProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DeviceLifeCycleEventProperties 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 DeviceLifeCycleEventProperties.

getDeviceId

public String getDeviceId()

Get the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ &#35; * ? ! ( ) , = @ ; $ '.

Returns:

the deviceId value.

getHubName

public String getHubName()

Get the hubName property: Name of the IoT Hub where the device was created or deleted.

Returns:

the hubName value.

getTwin

public DeviceTwinInfo getTwin()

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

Returns:

the twin value.

setDeviceId

public DeviceLifeCycleEventProperties setDeviceId(String deviceId)

Set the deviceId property: The unique identifier of the device. This case-sensitive string can be up to 128 characters long, and supports ASCII 7-bit alphanumeric characters plus the following special characters: - : . + % _ &#35; * ? ! ( ) , = @ ; $ '.

Parameters:

deviceId - the deviceId value to set.

Returns:

the DeviceLifeCycleEventProperties object itself.

setHubName

public DeviceLifeCycleEventProperties setHubName(String hubName)

Set the hubName property: Name of the IoT Hub where the device was created or deleted.

Parameters:

hubName - the hubName value to set.

Returns:

the DeviceLifeCycleEventProperties object itself.

setTwin

public DeviceLifeCycleEventProperties setTwin(DeviceTwinInfo twin)

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

Parameters:

twin - the twin value to set.

Returns:

the DeviceLifeCycleEventProperties object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to