Class DataStream.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.indices.DataStream.Builder
- All Implemented Interfaces:
CopyableBuilder<DataStream.Builder,,DataStream> MutableBuilder<DataStream.Builder,,DataStream> ObjectBuilder<DataStream>
- Enclosing class:
DataStream
public static class DataStream.Builder
extends ObjectBuilderBase
implements CopyableBuilder<DataStream.Builder,DataStream>
Builder for
DataStream.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal DataStream.BuilderallowCustomRouting(Boolean value) Whentrue, the data stream allows custom routing on write request.build()Builds aDataStream.copy()Create a new builderCopyableBuilderthat is a copy of this one.final DataStream.Buildergeneration(long value) Required - The current generation number for the data stream.final DataStream.BuilderWhentrue, the data stream is hidden.final DataStream.BuilderAPI name:ilm_policyfinal DataStream.BuilderRequired - An array of objects containing information about the data stream's backing indexes.final DataStream.Builderindices(List<DataStreamIndex> list) Required - An array of objects containing information about the data stream's backing indexes.final DataStream.Builderindices(DataStreamIndex value, DataStreamIndex... values) Required - An array of objects containing information about the data stream's backing indexes.final DataStream.BuilderAPI name:_metafinal DataStream.BuilderAPI name:_metafinal DataStream.BuilderRequired - API name:namefinal DataStream.BuildernextGenerationManagedBy(ManagedBy value) API name:next_generation_managed_byfinal DataStream.BuilderIndicates if ILM should take precedence over DSL in case both are configured to managed this data stream.final DataStream.Builderreplicated(Boolean value) Whentrue, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.final DataStream.Builderstatus(HealthStatus value) Required - API name:statusfinal DataStream.BuilderWhentrue, the data stream is created and managed by an OpenSearch stack component and cannot be modified through normal user interaction.final DataStream.BuilderRequired - API name:templatefinal DataStream.BuildertimestampField(Function<DataStreamTimestampField.Builder, ObjectBuilder<DataStreamTimestampField>> fn) Required - API name:timestamp_fieldfinal DataStream.BuilderRequired - API name:timestamp_fieldMethods inherited from class org.opensearch.client.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _listCopy, _mapCopy, _mapPut, _mapPutAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.client.util.MutableBuilder
applyMutation
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
copy
Description copied from interface:CopyableBuilderCreate a new builderCopyableBuilderthat is a copy of this one.- Specified by:
copyin interfaceCopyableBuilder<DataStream.Builder,DataStream> - Returns:
- a new builder instance.
-
allowCustomRouting
Whentrue, the data stream allows custom routing on write request.API name:
allow_custom_routing -
generation
Required - The current generation number for the data stream. This number acts as a cumulative count of the stream's rollovers, starting at 1.API name:
generation -
ilmPolicy
API name:ilm_policy -
indices
Required - An array of objects containing information about the data stream's backing indexes. The last item in this array contains information about the stream's current write index.API name:
indicesAdds all elements of
listtoindices. -
indices
Required - An array of objects containing information about the data stream's backing indexes. The last item in this array contains information about the stream's current write index.API name:
indicesAdds one or more values to
indices. -
indices
@Nonnull public final DataStream.Builder indices(Function<DataStreamIndex.Builder, ObjectBuilder<DataStreamIndex>> fn) Required - An array of objects containing information about the data stream's backing indexes. The last item in this array contains information about the stream's current write index.API name:
indicesAdds a value to
indicesusing a builder lambda. -
meta
API name:_metaAdds all elements of
maptometa. -
meta
API name:_metaAdds an entry to
meta. -
name
Required - API name:name -
nextGenerationManagedBy
API name:next_generation_managed_by -
preferIlm
Indicates if ILM should take precedence over DSL in case both are configured to managed this data stream.API name:
prefer_ilm -
replicated
Whentrue, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.API name:
replicated -
status
Required - API name:status -
system
Whentrue, the data stream is created and managed by an OpenSearch stack component and cannot be modified through normal user interaction.API name:
system -
template
Required - API name:template -
timestampField
Required - API name:timestamp_field -
timestampField
@Nonnull public final DataStream.Builder timestampField(Function<DataStreamTimestampField.Builder, ObjectBuilder<DataStreamTimestampField>> fn) Required - API name:timestamp_field -
build
Builds aDataStream.- Specified by:
buildin interfaceObjectBuilder<DataStream>- Throws:
NullPointerException- if some of the required fields are null.
-