Class DeviceLifeCycleEventProperties
- java.lang.Object
-
- com.microsoft.azure.eventgrid.models.DeviceLifeCycleEventProperties
-
- Direct Known Subclasses:
IotHubDeviceCreatedEventData,IotHubDeviceDeletedEventData
public class DeviceLifeCycleEventProperties extends Object
Schema of the Data property of an EventGridEvent for a device life cycle event (DeviceCreated, DeviceDeleted).
-
-
Constructor Summary
Constructors Constructor Description DeviceLifeCycleEventProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdeviceId()Get the unique identifier of the device.StringhubName()Get name of the IoT Hub where the device was created or deleted.DeviceTwinInfotwin()Get information about the device twin, which is the cloud representation of application device metadata.DeviceLifeCycleEventPropertieswithDeviceId(String deviceId)Set the unique identifier of the device.DeviceLifeCycleEventPropertieswithHubName(String hubName)Set name of the IoT Hub where the device was created or deleted.DeviceLifeCycleEventPropertieswithTwin(DeviceTwinInfo twin)Set information about the device twin, which is the cloud representation of application device metadata.
-
-
-
Method Detail
-
deviceId
public String deviceId()
Get 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: - : . + % _ # * ? ! ( ) , = @ ; $ '.- Returns:
- the deviceId value
-
withDeviceId
public DeviceLifeCycleEventProperties withDeviceId(String deviceId)
Set 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: - : . + % _ # * ? ! ( ) , = @ ; $ '.- Parameters:
deviceId- the deviceId value to set- Returns:
- the DeviceLifeCycleEventProperties object itself.
-
hubName
public String hubName()
Get name of the IoT Hub where the device was created or deleted.- Returns:
- the hubName value
-
withHubName
public DeviceLifeCycleEventProperties withHubName(String hubName)
Set name of the IoT Hub where the device was created or deleted.- Parameters:
hubName- the hubName value to set- Returns:
- the DeviceLifeCycleEventProperties object itself.
-
twin
public DeviceTwinInfo twin()
Get information about the device twin, which is the cloud representation of application device metadata.- Returns:
- the twin value
-
withTwin
public DeviceLifeCycleEventProperties withTwin(DeviceTwinInfo twin)
Set 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.
-
-