Class SetProcessor.Builder

All Implemented Interfaces:
WithJson<SetProcessor.Builder>, ObjectBuilder<SetProcessor>
Enclosing class:
SetProcessor

public static class SetProcessor.Builder extends ProcessorBase.AbstractBuilder<SetProcessor.Builder> implements ObjectBuilder<SetProcessor>
Builder for SetProcessor.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • copyFrom

      public final SetProcessor.Builder copyFrom(@Nullable String value)
      The origin field which will be copied to field, cannot set value simultaneously. Supported data types are boolean, number, array, object, string, date, etc.

      API name: copy_from

    • field

      public final SetProcessor.Builder field(String value)
      Required - The field to insert, upsert, or update. Supports template snippets.

      API name: field

    • ignoreEmptyValue

      public final SetProcessor.Builder ignoreEmptyValue(@Nullable Boolean value)
      If true and value is a template snippet that evaluates to null or the empty string, the processor quietly exits without modifying the document.

      API name: ignore_empty_value

    • mediaType

      public final SetProcessor.Builder mediaType(@Nullable String value)
      The media type for encoding value. Applies only when value is a template snippet. Must be one of application/json, text/plain, or application/x-www-form-urlencoded.

      API name: media_type

    • override

      public final SetProcessor.Builder override(@Nullable Boolean value)
      If true processor will update fields with pre-existing non-null-valued field. When set to false, such fields will not be touched.

      API name: override

    • value

      public final SetProcessor.Builder value(@Nullable JsonData value)
      The value to be set for the field. Supports template snippets. May specify only one of value or copy_from.

      API name: value

    • self

      protected SetProcessor.Builder self()
      Specified by:
      self in class ProcessorBase.AbstractBuilder<SetProcessor.Builder>
    • build

      public SetProcessor build()
      Builds a SetProcessor.
      Specified by:
      build in interface ObjectBuilder<SetProcessor>
      Throws:
      NullPointerException - if some of the required fields are null.