FilePartBuilder

Builder for creating FilePart instances with a fluent DSL.

Example usage:

val filePart = FilePartBuilder().apply {
file {
name = "example.txt"
mimeType = "text/plain"
bytes = "Hello World".encodeToByteArray()
}
}.create()

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun build(validate: Boolean = false): FilePart

Builds a FilePart instance with the configured properties.

Link copied to clipboard
fun file(fileContent: FileContent): FilePartBuilder

Sets the file content directly.

Configures the file content using a Java-friendly Consumer.

fun file(block: FileContentBuilder.() -> Unit)

Configures the file content using a DSL block.

Link copied to clipboard

Sets the metadata for the file part.