Class Policy

java.lang.Object
org.opensearch.client.opensearch.ism.Policy
All Implemented Interfaces:
JsonpSerializable, PlainJsonSerializable, ToCopyableBuilder<Policy.Builder,Policy>

@JsonpDeserializable @Generated("org.opensearch.client.codegen.CodeGenerator") public class Policy extends Object implements PlainJsonSerializable, ToCopyableBuilder<Policy.Builder,Policy>
The policy defines how an index is managed throughout its lifetime.
  • Field Details

  • Method Details

    • of

    • defaultState

      @Nullable public final String defaultState()
      The default state an index is in.

      API name: default_state

    • description

      @Nullable public final String description()
      The description of the policy.

      API name: description

    • errorNotification

      @Nullable public final ErrorNotification errorNotification()
      The configuration for error notifications.

      API name: error_notification

    • ismTemplate

      @Nonnull public final List<IsmTemplate> ismTemplate()
      The ISM template configuration.

      API name: ism_template

    • lastUpdatedTime

      @Nullable public final Integer lastUpdatedTime()
      When the policy was last updated.

      API name: last_updated_time

    • policyId

      @Nullable public final String policyId()
      The unique identifier for the policy.

      API name: policy_id

    • schemaVersion

      @Nullable public final Number schemaVersion()
      The version of the policy schema.

      API name: schema_version

    • states

      @Nonnull public final List<States> states()
      The list of states for the index to transition between.

      API name: states

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toBuilder

      @Nonnull public Policy.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Create a new builder ToCopyableBuilder that is initialised with the current state of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Policy.Builder,Policy>
      Returns:
      a new builder instance.
    • builder

      @Nonnull public static Policy.Builder builder()
    • setupPolicyDeserializer

      protected static void setupPolicyDeserializer(ObjectDeserializer<Policy.Builder> op)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object