Interface IPromptFileParametersDescriptorBuilder
-
public interface IPromptFileParametersDescriptorBuilderBuilder for the file parameters descriptor of a prompt query. Given a set of configuredfile parameters, derives a suitable file value descriptor. Eachkeywill correspond to a key in thefiles mapof the derived file value descriptor.- Since:
- 8.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendTo(FileValueDescriptor.Builder builder)Appends the properties to the given builder, using the current settings.IFileValueDescriptorbuild()Creates a new file value descriptor with the current settings.FileValueDescriptor.Builderbuilder()Creates a new file value descriptor builder, preconfigured with the current settings.IPromptFileParametersDescriptorBuilderdescriptionMessageKey(String descriptionMessageKey)Sets the message key for the description of the file parameters group, which is used when thefile parameterdoes not define adescription.IPromptFileParametersDescriptorBuilderfileParameters(IPromptQueryConfig_Files files)Sets the file parameters from which to derive the file value descriptor.IPromptFileParametersDescriptorBuilderfileParameters(PromptFiles files)Sets the file parameters from which to derive the file value descriptor.IPromptFileParametersDescriptorBuilderfileParameters(List<PromptFileSetParameter> files)Sets the file parameters from which to derive the file value descriptor.IPromptFileParametersDescriptorBuilderkeyPrefix(String keyPrefix)Sets the prefix that will be added to allkeys.IPromptFileParametersDescriptorBuilderlabelMessageKey(String labelMessageKey)Sets the message key for the label of the file parameters group, which is used when thefile parameterdoes not define alabel.
-
-
-
Method Detail
-
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
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
@CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder fileParameters(PromptFiles files)
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
@CanIgnoreReturnValue IPromptFileParametersDescriptorBuilder keyPrefix(String 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.
-
-