Add telegram file builder
This commit is contained in:
parent
901dc00c8e
commit
a74b588cba
@ -3,7 +3,7 @@ package com.cubetiqs.messaging.client.telegram
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* File Document
|
||||
* Telegram File Document
|
||||
*
|
||||
* @author sombochea
|
||||
* @since 1.0
|
||||
@ -13,4 +13,24 @@ open class TelegramFileDocument (
|
||||
var name: String? = null,
|
||||
var type: 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()
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user