BulkEnrollmentOperation.toJsonElement(BulkOperationMode mode, Collection<IndividualEnrollment> individualEnrollments) 方法

定义

Serializer

Creates aJsonElement 

</code> , whose content represents the mode and the collection of individualEnrollments in a JSON format.</p>

This is useful if the caller will integrate this JSON with JSON from other classes to generate a consolidated JSON.

public static JsonElement toJsonElement(BulkOperationMode mode, Collection<IndividualEnrollment> individualEnrollments)

参数

mode
BulkOperationMode

the BulkOperationMode that defines the single operation to do over the individualEnrollments.

individualEnrollments
Collection<IndividualEnrollment>

the collection of IndividualEnrollment that contains the description of each individualEnrollment.

返回

JsonElement

TheJsonElement 

</code> with the content of this class. </p>

例外

IllegalArgumentException

if one of the parameters is invalid.

适用于