public class ImportBatchBuilder
extends java.lang.Object
| Constructor and Description |
|---|
ImportBatchBuilder() |
| Modifier and Type | Method and Description |
|---|---|
util.object.Either<Error,java.util.List<ImportInput>> |
build(ImportRequest... requestsToBatch)
Maps the given
ImportRequests to ImportInputs. |
public util.object.Either<Error,java.util.List<ImportInput>> build(ImportRequest... requestsToBatch)
ImportRequests to ImportInputs.
If the given array is null or empty, or if it only contains
null elements, an empty list will be returned. Otherwise any
null elements are filtered out, while the remaining non-null requests are validated. If validation fails for some of them, an Error will
be returned that details the detected validation errors for each request
that didn't pass validation. On the other hand, if all the non-null requests pass validation, they're turned into ImportInputs
and returned in a list.requestsToBatch - the requests that will be part of the batch.ImportInput for each successfully validated
request or an error if validation failed.