com.antonioaltieri.telegram.botapi.types.Document Maven / Gradle / Ivy
package com.antonioaltieri.telegram.botapi.types;
import com.antonioaltieri.telegram.botapi.types.Audio;
import com.antonioaltieri.telegram.botapi.types.PhotoSize;
import com.google.gson.annotations.SerializedName;
/**
* This object represents a general file (as opposed to photos ({@link PhotoSize}) and audio ({@link Audio}) files).
*
* Any getters labeled optional might return a default value (such as {@code null}).
*
* @see Optional.
*
* @return Document thumbnail as defined by sender
*/
public PhotoSize getThumb() {
return thumb;
}
/**
* Optional.
*
* @return Original filename as defined by sender
*/
public String getFileName() {
return fileName;
}
/**
* Optional.
*
* @return MIME type of the file as defined by sender
*/
public String getMimeType() {
return mimeType;
}
/**
* Optional.
*
* @return File size of this document
*/
public long getFileSize() {
return fileSize;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("Document{");
sb.append("fileId='").append(fileId).append('\'');
sb.append(", thumb=").append(thumb);
sb.append(", fileName='").append(fileName).append('\'');
sb.append(", mimeType='").append(mimeType).append('\'');
sb.append(", fileSize=").append(fileSize);
sb.append('}');
return sb.toString();
}
}