All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Explore the source code of the class Document.java


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 ([email protected] PhotoSize}) and audio ([email protected] Audio}) files).
 *
 * Any getters labeled optional might return a default value (such as [email protected] 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();
    }
}