Package org.drinkless.tdlib

# Class TdApi.AddFileToDownloads

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Function<TdApi.File>
org.drinkless.tdlib.TdApi.AddFileToDownloads

Enclosing class:
  `TdApi`

public static class TdApi.AddFileToDownloads extends TdApi.Function<TdApi.File>
Adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.

Returns `File`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.Function

  `TdApi.Function.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `chatId`
  Chat identifier of the message with the file.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `int`
  `fileId`
  Identifier of the file to download.
  `long`
  `messageId`
  Message identifier.
  `int`
  `priority`
  Priority of the download (1-32).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddFileToDownloads()`
  Default constructor for a function, which adds a file from a message to the list of file downloads.
  `AddFileToDownloads(int fileId, long chatId, long messageId, int priority)`
  Creates a function, which adds a file from a message to the list of file downloads.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Function

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### fileId

    public int fileId
    Identifier of the file to download.

  - ### chatId

    public long chatId
    Chat identifier of the message with the file.

  - ### messageId

    public long messageId
    Message identifier.

  - ### priority

    public int priority
    Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### AddFileToDownloads

    public AddFileToDownloads()
    Default constructor for a function, which adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.

    Returns `File`

  - ### AddFileToDownloads

    public AddFileToDownloads(int fileId, long chatId, long messageId, int priority)
    Creates a function, which adds a file from a message to the list of file downloads. Download progress and completion of the download will be notified through updateFile updates. If message database is used, the list of file downloads is persistent across application restarts. The downloading is independent of download using downloadFile, i.e. it continues if downloadFile is canceled or is used to download a part of the file.

    Returns `File`

    Parameters:
      `fileId` - Identifier of the file to download.
      `chatId` - Chat identifier of the message with the file.
      `messageId` - Message identifier.
      `priority` - Priority of the download (1-32). The higher the priority, the earlier the file will be downloaded. If the priorities of two files are equal, then the last one for which downloadFile/addFileToDownloads was called will be downloaded first.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Function<TdApi.File>`
    Returns:
      this.CONSTRUCTOR