Class FieldsBuilder

java.lang.Object
com.inductiveautomation.ignition.designer.ai.embed.FieldsBuilder

public final class FieldsBuilder extends Object
Assembles text in the canonical Key: value shape — one key: value line per field in the order it is added.
  • Method Details

    • put

      public FieldsBuilder put(String key, @Nullable String value)
      Appends one key: value line, or does nothing when value is null or blank. Callers pass distinct keys; a repeated key appends a second line rather than replacing the first.
      Parameters:
      key - the field name.
      value - the field value, or null/blank to skip this field.
      Returns:
      this builder.
    • build

      public static String build(Consumer<FieldsBuilder> spec)
      Assembles a Key: value block with a scoped builder.
      Parameters:
      spec - populates the builder, e.g. f -> f.put("Path", path).put("Kind", kind).
      Returns:
      the assembled wire text — one key: value line per field in the order added.
      See Also: