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

Explore the source code of the class Sticker.java

package com.antonioaltieri.telegram.botapi.types;

import com.antonioaltieri.telegram.botapi.types.PhotoSize;
import com.google.gson.annotations.SerializedName;

/**
 * This object represents a sticker.
 *
 * Getters labeled optional might return a default value (such as {@code null}).
 *
 * @see https://core.telegram.org/bots/api#sticker
 */
public class Sticker {

    @SerializedName("file_id")
    private String fileId;

    @SerializedName("width")
    private int width;

    @SerializedName("height")
    private int height;

    @SerializedName("thumb")
    private com.antonioaltieri.telegram.botapi.types.PhotoSize thumb;

    @SerializedName("file_size")
    private int fileSize;

    /**
     * @return Unique identifier for this file
     */
    public String getFileId() {
        return fileId;
    }

    /**
     * @return Sticker width
     */
    public int getWidth() {
        return width;
    }

    /**
     * @return Sticker height
     */
    public int getHeight() {
        return height;
    }

    /**
     * Optional.
     *
     * @return Sticker thumbnail in .webp or .jpg format
     */
    public PhotoSize getThumb() {
        return thumb;
    }

    /**
     * Optional.
     *
     * @return File size
     */
    public int getFileSize() {
        return fileSize;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Sticker{");
        sb.append("fileId='").append(fileId).append('\'');
        sb.append(", width=").append(width);
        sb.append(", height=").append(height);
        sb.append(", thumb=").append(thumb);
        sb.append(", fileSize=").append(fileSize);
        sb.append('}');
        return sb.toString();
    }
}