Class Policy.Builder
java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.ism.Policy.Builder
- All Implemented Interfaces:
CopyableBuilder<Policy.Builder,,Policy> MutableBuilder<Policy.Builder,,Policy> ObjectBuilder<Policy>
- Enclosing class:
Policy
public static class Policy.Builder
extends ObjectBuilderBase
implements CopyableBuilder<Policy.Builder,Policy>
Builder for
Policy.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aPolicy.copy()Create a new builderCopyableBuilderthat is a copy of this one.final Policy.BuilderdefaultState(String value) The default state an index is in.final Policy.Builderdescription(String value) The description of the policy.final Policy.BuilderThe configuration for error notifications.final Policy.BuilderThe configuration for error notifications.final Policy.BuilderThe ISM template configuration.final Policy.BuilderismTemplate(List<IsmTemplate> list) The ISM template configuration.final Policy.BuilderismTemplate(IsmTemplate value, IsmTemplate... values) The ISM template configuration.final Policy.BuilderlastUpdatedTime(Integer value) When the policy was last updated.final Policy.BuilderThe unique identifier for the policy.final Policy.BuilderschemaVersion(Number value) The version of the policy schema.final Policy.BuilderThe list of states for the index to transition between.final Policy.BuilderThe list of states for the index to transition between.final Policy.BuilderThe list of states for the index to transition between.Methods 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<Policy.Builder,Policy> - Returns:
- a new builder instance.
-
defaultState
The default state an index is in.API name:
default_state -
description
The description of the policy.API name:
description -
errorNotification
The configuration for error notifications.API name:
error_notification -
errorNotification
@Nonnull public final Policy.Builder errorNotification(Function<ErrorNotification.Builder, ObjectBuilder<ErrorNotification>> fn) The configuration for error notifications.API name:
error_notification -
ismTemplate
The ISM template configuration.API name:
ism_templateAdds all elements of
listtoismTemplate. -
ismTemplate
The ISM template configuration.API name:
ism_templateAdds one or more values to
ismTemplate. -
ismTemplate
@Nonnull public final Policy.Builder ismTemplate(Function<IsmTemplate.Builder, ObjectBuilder<IsmTemplate>> fn) The ISM template configuration.API name:
ism_templateAdds a value to
ismTemplateusing a builder lambda. -
lastUpdatedTime
When the policy was last updated.API name:
last_updated_time -
policyId
The unique identifier for the policy.API name:
policy_id -
schemaVersion
The version of the policy schema.API name:
schema_version -
states
The list of states for the index to transition between.API name:
statesAdds all elements of
listtostates. -
states
The list of states for the index to transition between.API name:
statesAdds one or more values to
states. -
states
The list of states for the index to transition between.API name:
statesAdds a value to
statesusing a builder lambda. -
build
Builds aPolicy.- Specified by:
buildin interfaceObjectBuilder<Policy>- Throws:
NullPointerException- if some of the required fields are null.
-