BackUpMessage

class BackUpMessage constructor(val id: String = UUID.randomUUID().toString(), val piuri: String, val from: DID? = null, val to: DID? = null, val fromPrior: String? = null, val body: String, val extraHeaders: Map<String, String> = emptyMap(), val createdTime: Long? = null, val expiresTime: Long? = null, val attachments: Array<AttachmentDescriptor> = arrayOf(), val thid: String? = null, val pthid: String? = null, val ack: Array<String>? = emptyArray(), val direction: Message.Direction = Message.Direction.RECEIVED)(source)

The BackUpMessage class represents a backup message that contains various properties such as ID, PIURI, from, to, fromPrior, body, extraHeaders, createdTime, expiresTime, attachments, thid, pthid, ack, and direction.

This class provides methods to convert the BackUpMessage object to a Message object.

Constructors

Link copied to clipboard
constructor(id: String = UUID.randomUUID().toString(), piuri: String, from: DID? = null, to: DID? = null, fromPrior: String? = null, body: String, extraHeaders: Map<String, String> = emptyMap(), createdTime: Long? = null, expiresTime: Long? = null, attachments: Array<AttachmentDescriptor> = arrayOf(), thid: String? = null, pthid: String? = null, ack: Array<String>? = emptyArray(), direction: Message.Direction = Message.Direction.RECEIVED)

Properties

Link copied to clipboard

The acknowledgements of the backup message as an array of string values.

Link copied to clipboard

The attachments of the backup message as an array of AttachmentDescriptor objects.

Link copied to clipboard
@Serializable(with = PlutoRestoreTask.BackUpMessage.JsonAsStringSerializer::class)
val body: String

The body of the backup message.

Link copied to clipboard
@Serializable(with = PlutoRestoreTask.BackUpMessage.EpochSecondsSerializer::class)
@SerialName(value = "created_time")
val createdTime: Long? = null

The timestamp of when the backup message was created, represented as a string of epoch seconds.

Link copied to clipboard
@Serializable(with = PlutoRestoreTask.BackUpMessage.DirectionSerializer::class)
val direction: Message.Direction

The direction of the backup message, represented by the Message.Direction enum class.

Link copied to clipboard
@Serializable(with = PlutoRestoreTask.BackUpMessage.EpochSecondsSerializer::class)
@SerialName(value = "expires_time_plus")
val expiresTime: Long? = null

The timestamp of when the backup message expires, represented as a string of epoch seconds.

Link copied to clipboard
@SerialName(value = "extra_headers")
val extraHeaders: Map<String, String>

Additional headers of the backup message as a key-value map.

Link copied to clipboard
@Serializable(with = PlutoRestoreTask.BackUpMessage.DIDMessageSerializer::class)
val from: DID? = null

The sender of the backup message represented by a DID (Decentralized Identifier).

Link copied to clipboard

The previous DID of the sender, if any.

Link copied to clipboard

The ID of the backup message. If not provided, a random UUID will be generated.

Link copied to clipboard

The PIURI (Public Identifier Universal Resource Identifier) of the backup message.

Link copied to clipboard
val pthid: String? = null

The parent thread ID of the backup message, if any.

Link copied to clipboard
val thid: String? = null

The thread ID of the backup message, if any.

Link copied to clipboard
@Serializable(with = PlutoRestoreTask.BackUpMessage.DIDMessageSerializer::class)
val to: DID? = null

The recipient of the backup message represented by a DID (Decentralized Identifier).

Functions

Link copied to clipboard

Converts the current object to a Message object.