public class DeviceRegistrationState extends Object
Example of JSON format:
{
"registrationId":"validRegistrationId",
"createdDateTimeUtc": "2017-09-28T16:29:42.3447817Z",
"assignedHub":"ContosoIoTHub.azure-devices.net",
"deviceId":"ContosoDevice-123",
"status":"assigned"
"lastUpdatedDateTimeUtc": "2017-09-28T16:29:42.3447817Z",
"errorCode":200
"errorMessage":"Succeeded"
"etag": "\"00000000-0000-0000-0000-00000000000\""
}
| Constructor and Description |
|---|
DeviceRegistrationState(String json)
CONSTRUCTOR
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAssignedHub()
Getter for the assignedHub.
|
Date |
getCreatedDateTimeUtc()
Getter for the createdDateTimeUtc.
|
String |
getDeviceId()
Getter for the deviceId.
|
Integer |
getErrorCode()
Getter for the errorCode.
|
String |
getErrorMessage()
Getter for the errorMessage.
|
String |
getEtag()
Getter for the etag.
|
Date |
getLastUpdatedDateTimeUtc()
Getter for the lastUpdatedDateTimeUtc.
|
String |
getRegistrationId()
Getter for the registrationId.
|
EnrollmentStatus |
getStatus()
Getter for the status.
|
public DeviceRegistrationState(String json)
This constructor creates an instance of the device registration state filling the class with the information provided in the JSON.
json - the String with the JSON received from the provisioning service.IllegalArgumentException - If the provided JSON is null, empty, or invalid.public String getRegistrationId()
String with the registrationID content. It cannot be null or empty.public String getDeviceId()
String with the deviceID content. It can be null.public Date getCreatedDateTimeUtc()
Date with the createdDateTimeUtc content. It can be null.public Date getLastUpdatedDateTimeUtc()
Date with the lastUpdatedDateTimeUtc content. It can be null.public String getAssignedHub()
String with the assignedHub content. It can be null.public EnrollmentStatus getStatus()
EnrollmentStatus with the status content. It can be null.public Integer getErrorCode()
Integer with the errorCode content. It can be null.public String getErrorMessage()
String with the errorMessage content. It can be null.public String getEtag()
String with the etag content. It can be null.Copyright © 2021. All rights reserved.