Sha256: 172135f7e0493d548315fda340ea5650d0733680477e1364adc56db719fa5f1c

Contents?: true

Size: 1.7 KB

Versions: 2

Compression:

Stored size: 1.7 KB

Contents

module TD::Types
  # Represents a remote file.
  #
  # @attr id [TD::Types::String, nil] Remote file identifier; may be empty.
  #   Can be used by the current user across application restarts or even from other devices.
  #   Uniquely identifies a file, but a file can have a lot of different valid identifiers.
  #   If the ID starts with "http://" or "https://", it represents the HTTP URL of the file.
  #   TDLib is currently unable to download files if only their URL is known.
  #   If downloadFile is called on such a file or if it is sent to a secret chat, TDLib starts a file generation
  #   process by sending {TD::Types::Update::FileGenerationStart} to the application with the HTTP URL in the original_path
  #   and "#url#" as the conversion string.
  #   Application should generate the file by downloading it to the specified location.
  # @attr unique_id [TD::Types::String, nil] Unique file identifier; may be empty if unknown.
  #   The unique file identifier which is the same for the same file even for different users and is persistent over
  #   time.
  # @attr is_uploading_active [Boolean] True, if the file is currently being uploaded (or a remote copy is being
  #   generated by some other means).
  # @attr is_uploading_completed [Boolean] True, if a remote copy is fully available.
  # @attr uploaded_size [Integer] Size of the remote available part of the file; 0 if unknown.
  class RemoteFile < Base
    attribute :id, TD::Types::String.optional.default(nil)
    attribute :unique_id, TD::Types::String.optional.default(nil)
    attribute :is_uploading_active, TD::Types::Bool
    attribute :is_uploading_completed, TD::Types::Bool
    attribute :uploaded_size, TD::Types::Coercible::Integer
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tdlib-schema-1.7.0.3 lib/tdlib/types/remote_file.rb
tdlib-schema-1.7.0.2 lib/tdlib/types/remote_file.rb