build

inline fun <T : Serializable> <Error class: unknown class>.build(id: String = UUID.randomUUID().toString(), payload: T, mediaType: String? = ContentType.Application.Json.toString()): AttachmentDescriptor(source)

Builds an AttachmentDescriptor object with the specified parameters.

Return

The built AttachmentDescriptor object.

Parameters

id

The unique identifier for the attachment. If not provided, a random UUID will be generated.

payload

The payload data for the attachment.

mediaType

The media type of the attachment. If not provided, the default media type will be used.