Interface IPromptFileParametersDescriptorBuilder


public interface IPromptFileParametersDescriptorBuilder
Builder for the file parameters descriptor of a prompt query. Given a set of configured file parameters, derives a suitable file value descriptor. Each key will correspond to a key in the files map of the derived file value descriptor.
Since:
8.5.0
  • Method Details

    • appendTo

      void appendTo(FileValueDescriptor.Builder builder)
      Appends the properties to the given builder, using the current settings.
      Parameters:
      builder - The builder to append to.
    • build

      Creates a new file value descriptor with the current settings.
      Returns:
      A new file value descriptor.
    • builder

      Creates a new file value descriptor builder, preconfigured with the current settings. Useful if you want to further customize the descriptor.
      Returns:
      A new file value descriptor builder.
    • descriptionMessageKey

      @CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder descriptionMessageKey(String descriptionMessageKey)
      Sets the message key for the description of the file parameters group, which is used when the file parameter does not define a description.

      The following parameters are passed on to the label message (via MessageFormat):

      • 0 - The 1-based index of the file parameter group, e.g. 1, 2, 3, ...
      • 1 - The total number of file parameter groups.
      • 2 - The multiplicity of the file parameter group, either "1" (only a single file allowed) or "2" (multiple files allowed).
      Parameters:
      descriptionMessageKey - The description message key.
      Returns:
      This builder for chaining method calls.
    • fileParameters

      @CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder fileParameters(List<PromptFileSetParameter> files)
      Sets the file parameters from which to derive the file value descriptor.
      Parameters:
      files - The file parameters.
      Returns:
      This builder for chaining method calls.
    • fileParameters

      @CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder fileParameters(PromptFiles files)
      Sets the file parameters from which to derive the file value descriptor. Uses only the dynamic files of the given instance, the static files are ignored.
      Parameters:
      files - The file parameters.
      Returns:
      This builder for chaining method calls.
    • fileParameters

      @CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder fileParameters(IPromptQueryConfig_Files files)
      Sets the file parameters from which to derive the file value descriptor.
      Parameters:
      files - The file parameters.
      Returns:
      This builder for chaining method calls.
    • keyPrefix

      @CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder keyPrefix(String keyPrefix)
      Sets the prefix that will be added to all keys. Defaults to "files". The default is suitable for the main set of files of a prompt query. When you have secondary files, such as a mask image for an image edit task, you should set this to a different value, e.g. "mask".
      Parameters:
      keyPrefix - The key prefix.
      Returns:
      This builder for chaining method calls.
    • labelMessageKey

      @CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder labelMessageKey(String labelMessageKey)
      Sets the message key for the label of the file parameters group, which is used when the file parameter does not define a label.

      The following parameters are passed on to the label message (via MessageFormat):

      • 0 - The 1-based index of the file parameter group, e.g. 1, 2, 3, ...
      • 1 - The total number of file parameter groups.
      • 2 - The multiplicity of the file parameter group, either "1" (only a single file allowed) or "2" (multiple files allowed).
      Parameters:
      labelMessageKey - The label message key.
      Returns:
      This builder for chaining method calls.