Compartir a través de


BulkEnrollmentOperationResult Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.provisioning.service.configs.BulkEnrollmentOperationResult

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 runBulkEnrollmentOperation(BulkOperationMode bulkOperationMode, Collection<IndividualEnrollment> individualEnrollments).

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"
         }
     ]
 }

Constructor Summary

Modifier Constructor Description
protected BulkEnrollmentOperationResult()

Empty constructor

BulkEnrollmentOperationResult(String json)

CONSTRUCTOR

Method Summary

Modifier and Type Method and Description
java.util.List<BulkEnrollmentOperationError> getErrors()

Getter for the bulk of errors.

java.lang.Boolean getSuccessful()

Getter for the Bulk Operation successful.

java.lang.String toString()

Creates a pretty print JSON with the content of this class and subclasses.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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 - the String with the JSON received from the provisioning service.

Method Details

getErrors

public List getErrors()

Getter for the bulk of errors.

Returns:

The BulkEnrollmentOperationError with the errors content. It can be null.

getSuccessful

public Boolean getSuccessful()

Getter for the Bulk Operation successful.

Returns:

The Boolean with the isSuccessful content. It cannot be null.

toString

public String toString()

Creates a pretty print JSON with the content of this class and subclasses.

Overrides:

BulkEnrollmentOperationResult.toString()

Returns:

The String with the pretty print JSON.

Applies to