DeviceRegistrationState Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. service. configs. DeviceRegistrationState
- com.
public class DeviceRegistrationState
Representation of a single Device Provisioning Service device registration state with a JSON deserializer.
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 Summary
Constructor | Description |
---|---|
DeviceRegistrationState(String json) |
CONSTRUCTOR |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAssignedHub()
Getter for the assigned |
java.util.Date |
getCreatedDateTimeUtc()
Getter for the created |
java.lang.String |
getDeviceId()
Getter for the device |
java.lang.Integer |
getErrorCode()
Getter for the error |
java.lang.String |
getErrorMessage()
Getter for the error |
java.lang.String |
getEtag()
Getter for the etag. |
java.util.Date |
getLastUpdatedDateTimeUtc()
Getter for the last |
java.lang.String |
getRegistrationId()
Getter for the registration |
Enrollment |
getStatus()
Getter for the status. |
Methods inherited from java.lang.Object
Constructor Details
DeviceRegistrationState
public DeviceRegistrationState(String json)
CONSTRUCTOR
This constructor creates an instance of the device registration state filling the class with the information provided in the JSON.
Parameters:
String
with the JSON received from the provisioning service.
Method Details
getAssignedHub
public String getAssignedHub()
Getter for the assignedHub.
Returns:
String
with the assignedHub content. It can be null
.getCreatedDateTimeUtc
public Date getCreatedDateTimeUtc()
Getter for the createdDateTimeUtc.
Returns:
Date
with the createdDateTimeUtc content. It can be null
.getDeviceId
public String getDeviceId()
Getter for the deviceId.
Returns:
String
with the deviceID content. It can be null
.getErrorCode
public Integer getErrorCode()
Getter for the errorCode.
Returns:
Integer
with the errorCode content. It can be null
.getErrorMessage
public String getErrorMessage()
Getter for the errorMessage.
Returns:
String
with the errorMessage content. It can be null
.getEtag
public String getEtag()
Getter for the etag.
Returns:
String
with the etag content. It can be null
.getLastUpdatedDateTimeUtc
public Date getLastUpdatedDateTimeUtc()
Getter for the lastUpdatedDateTimeUtc.
Returns:
Date
with the lastUpdatedDateTimeUtc content. It can be null
.getRegistrationId
public String getRegistrationId()
Getter for the registrationId.
Returns:
String
with the registrationID content. It cannot be null
or empty.getStatus
public EnrollmentStatus getStatus()
Getter for the status.
Returns:
EnrollmentStatus
with the status content. It can be null
.Applies to
Azure SDK for Java