2021-05-20 18:43:52 +07:00
|
|
|
package com.cubetiqs.messaging.client.telegram
|
|
|
|
|
|
|
|
import java.io.Serializable
|
|
|
|
|
|
|
|
/**
|
2021-05-21 09:44:48 +07:00
|
|
|
* Telegram File Document
|
2021-05-20 18:43:52 +07:00
|
|
|
*
|
|
|
|
* @author sombochea
|
|
|
|
* @since 1.0
|
|
|
|
*/
|
|
|
|
open class TelegramFileDocument (
|
|
|
|
var file: ByteArray? = null,
|
|
|
|
var name: String? = null,
|
|
|
|
var type: String? = null,
|
|
|
|
var extension: String? = null,
|
2021-05-21 09:44:48 +07:00
|
|
|
) : 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()
|
|
|
|
}
|
|
|
|
}
|