Class BulkResponse.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BulkResponse.Builder>
co.elastic.clients.elasticsearch.core.BulkResponse.Builder
- All Implemented Interfaces:
WithJson<BulkResponse.Builder>
,ObjectBuilder<BulkResponse>
- Enclosing class:
- BulkResponse
public static class BulkResponse.Builder
extends WithJsonObjectBuilderBase<BulkResponse.Builder>
implements ObjectBuilder<BulkResponse>
Builder for
BulkResponse
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aBulkResponse
.final BulkResponse.Builder
errors
(boolean value) Required - Iftrue
, one or more of the operations in the bulk request did not complete successfully.final BulkResponse.Builder
ingestTook
(Long value) API name:ingest_took
final BulkResponse.Builder
items
(BulkResponseItem value, BulkResponseItem... values) Required - The result of each operation in the bulk request, in the order they were submitted.final BulkResponse.Builder
Required - The result of each operation in the bulk request, in the order they were submitted.final BulkResponse.Builder
items
(List<BulkResponseItem> list) Required - The result of each operation in the bulk request, in the order they were submitted.protected BulkResponse.Builder
self()
final BulkResponse.Builder
took
(long value) Required - The length of time, in milliseconds, it took to process the bulk request.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
errors
Required - Iftrue
, one or more of the operations in the bulk request did not complete successfully.API name:
errors
-
items
Required - The result of each operation in the bulk request, in the order they were submitted.API name:
items
Adds all elements of
list
toitems
. -
items
Required - The result of each operation in the bulk request, in the order they were submitted.API name:
items
Adds one or more values to
items
. -
items
public final BulkResponse.Builder items(Function<BulkResponseItem.Builder, ObjectBuilder<BulkResponseItem>> fn) Required - The result of each operation in the bulk request, in the order they were submitted.API name:
items
Adds a value to
items
using a builder lambda. -
took
Required - The length of time, in milliseconds, it took to process the bulk request.API name:
took
-
ingestTook
API name:ingest_took
-
self
- Specified by:
self
in classWithJsonObjectBuilderBase<BulkResponse.Builder>
-
build
Builds aBulkResponse
.- Specified by:
build
in interfaceObjectBuilder<BulkResponse>
- Throws:
NullPointerException
- if some of the required fields are null.
-