Add telegram file builder

This commit is contained in:
Sambo Chea 2021-05-21 09:44:48 +07:00
parent 901dc00c8e
commit a74b588cba

View File

@ -3,7 +3,7 @@ package com.cubetiqs.messaging.client.telegram
import java.io.Serializable import java.io.Serializable
/** /**
* File Document * Telegram File Document
* *
* @author sombochea * @author sombochea
* @since 1.0 * @since 1.0
@ -13,4 +13,24 @@ open class TelegramFileDocument (
var name: String? = null, var name: String? = null,
var type: String? = null, var type: String? = null,
var extension: String? = null, var extension: String? = null,
) : Serializable ) : Serializable {
fun setFile(file: ByteArray?) = apply {
this.file = file
}
fun setName(name: String?) = apply {
this.name = name
}
fun setType(type: String?) = apply {
this.type = type
}
fun setExtension(extension: String?) = apply {
this.extension = extension
}
companion object {
fun create() = TelegramFileDocument()
}
}