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 Summary
Modifier and TypeMethodDescriptionvoidappendTo(FileValueDescriptor.Builder builder) Appends the properties to the given builder, using the current settings.build()Creates a new file value descriptor with the current settings.builder()Creates a new file value descriptor builder, preconfigured with the current settings.descriptionMessageKey(String descriptionMessageKey) Sets the message key for the description of the file parameters group, which is used when thefile parameterdoes not define adescription.Sets the file parameters from which to derive the file value descriptor.fileParameters(PromptFiles files) Sets the file parameters from which to derive the file value descriptor.fileParameters(List<PromptFileSetParameter> files) Sets the file parameters from which to derive the file value descriptor.Sets the prefix that will be added to allkeys.labelMessageKey(String labelMessageKey) Sets the message key for the label of the file parameters group, which is used when thefile parameterdoes not define alabel.
-
Method Details
-
appendTo
Appends the properties to the given builder, using the current settings.- Parameters:
builder- The builder to append to.
-
build
IFileValueDescriptor build()Creates a new file value descriptor with the current settings.- Returns:
- A new file value descriptor.
-
builder
FileValueDescriptor.Builder 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 thefile parameterdoes not define adescription.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
Sets the file parameters from which to derive the file value descriptor. Uses only thedynamic filesof the given instance, thestatic filesare 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
Sets the prefix that will be added to allkeys. 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 thefile parameterdoes not define alabel.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.
-