Class BulkRequest.Builder<TSource>
java.lang.Object
co.elastic.clients.elasticsearch.monitoring.BulkRequest.Builder<TSource>
- All Implemented Interfaces:
ObjectBuilder<BulkRequest<TSource>>
- Enclosing class:
- BulkRequest<TSource>
public static class BulkRequest.Builder<TSource> extends java.lang.Object implements ObjectBuilder<BulkRequest<TSource>>
Builder for
BulkRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description BulkRequest.Builder<TSource>
addDocument(TSource value)
Add a document tooperations(List)
, creating the list if needed.BulkRequest.Builder<TSource>
addOperation(Operation value)
Add an Operation tooperations(List)
, creating the list if needed.BulkRequest.Builder<TSource>
addOperation(java.util.function.Function<Operation.Builder,ObjectBuilder<Operation>> fn)
Add an Operation tooperations(List)
, creating the list if needed.BulkRequest<TSource>
build()
Builds aBulkRequest
.BulkRequest.Builder<TSource>
interval(java.lang.String value)
Required - Collection interval (e.g., '10s' or '10000ms') of the payloadBulkRequest.Builder<TSource>
operations(java.lang.Object... value)
Required - Request body.BulkRequest.Builder<TSource>
operations(java.util.List<java.lang.Object> value)
Required - Request body.BulkRequest.Builder<TSource>
systemApiVersion(java.lang.String value)
Required -BulkRequest.Builder<TSource>
systemId(java.lang.String value)
Required - Identifier of the monitored systemBulkRequest.Builder<TSource>
tSourceSerializer(JsonpSerializer<TSource> value)
Serializer for TSource.BulkRequest.Builder<TSource>
type(java.lang.String value)
Default document type for items which don't provide oneMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
type
Default document type for items which don't provide oneAPI name:
type
-
systemId
Required - Identifier of the monitored systemAPI name:
system_id
-
systemApiVersion
Required -API name:
system_api_version
-
interval
Required - Collection interval (e.g., '10s' or '10000ms') of the payloadAPI name:
interval
-
operations
Required - Request body.API name:
_value_body
-
operations
Required - Request body.API name:
_value_body
-
addOperation
Add an Operation tooperations(List)
, creating the list if needed. -
addDocument
Add a document tooperations(List)
, creating the list if needed. -
addOperation
public BulkRequest.Builder<TSource> addOperation(java.util.function.Function<Operation.Builder,ObjectBuilder<Operation>> fn)Add an Operation tooperations(List)
, creating the list if needed. -
tSourceSerializer
Serializer for TSource. If not set, an attempt will be made to find a serializer from the JSON context. -
build
Builds aBulkRequest
.- Specified by:
build
in interfaceObjectBuilder<TSource>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-