BulkEnrollmentOperationResult Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. service. configs. BulkEnrollmentOperationResult
- com.
public class BulkEnrollmentOperationResult
Representation of a single Device Provisioning Service bulk operation result with a JSON deserializer.
This result is returned as a result of the ProvisioningServiceClient#runBulkEnrollmentOperation(BulkOperationMode, Collection).
The provisioning service provides general bulk result in the isSuccessful, and a individual error result for each enrolment in the bulk.
The following JSON is an example of the result from a bulk operation.
{
"isSuccessful":true,
"errors": [
{
"registrationId":"validRegistrationId1",
"errorCode":200,
"errorStatus":"Succeeded"
},
{
"registrationId":"validRegistrationId2",
"errorCode":200,
"errorStatus":"Succeeded"
}
]
}
</code></pre></p>
Constructor Summary
Constructor
Description
BulkEnrollmentOperationResult()
Empty constructor
Used only by the tools that will deserialize this class.
BulkEnrollmentOperationResult(String json)
CONSTRUCTOR
This constructor creates an instance of the enrollment filling the class with the information provided in the JSON.
Method Summary
Modifier and Type
Method and Description
List<BulkEnrollmentOperationError >
getErrors()
Getter for the bulk of errors.
Boolean
getSuccessful()
Getter for the Bulk Operation successful.
String
toString()
Creates a pretty print JSON with the content of this class and subclasses.
Constructor Details
BulkEnrollmentOperationResult
protected BulkEnrollmentOperationResult()
Empty constructor
Used only by the tools that will deserialize this class.
BulkEnrollmentOperationResult
public BulkEnrollmentOperationResult(String json)
CONSTRUCTOR
This constructor creates an instance of the enrollment filling the class with the information provided in the JSON.
Parameters:
json
- theString
</code> with the JSON received from the provisioning service. </p>
Throws:
IllegalArgumentException
- If the provided JSON is null, empty, or invalid.
Method Details
getErrors
public List getErrors()
Getter for the bulk of errors.
Returns:
TheBulkEnrollmentOperationError
</code> with the errors content. It can be<code>null
</code> . </p>
getSuccessful
public Boolean getSuccessful()
Getter for the Bulk Operation successful.
Returns:
TheBoolean
</code> with the isSuccessful content. It cannot be<code>null
</code> . </p>
toString
public String toString()
Creates a pretty print JSON with the content of this class and subclasses.
Returns:
TheString
</code> with the pretty print JSON. </p>
Applies to
Azure SDK for Java