Class Audio

java.lang.Object
io.micronaut.chatbots.telegram.api.AbstractFile
io.micronaut.chatbots.telegram.api.Audio

public class Audio extends AbstractFile
This object represents an audio file to be treated as music by the Telegram clients.
Since:
1.0.0
Author:
Sergio del Amo
See Also:
  • Constructor Details

    • Audio

      public Audio()
  • Method Details

    • getDuration

      @NonNull public @NonNull Integer getDuration()
      Returns:
      Duration of the audio in seconds as defined by sender.
    • setDuration

      public void setDuration(@NonNull @NonNull Integer duration)
      Parameters:
      duration - Duration of the audio in seconds as defined by sender.
    • getPerformer

      @Nullable public @Nullable String getPerformer()
      Returns:
      Performer of the audio as defined by sender or by audio tags.
    • setPerformer

      public void setPerformer(@Nullable @Nullable String performer)
      Parameters:
      performer - Performer of the audio as defined by sender or by audio tags.
    • getTitle

      @Nullable public @Nullable String getTitle()
      Returns:
      Title of the audio as defined by sender or by audio tags.
    • setTitle

      public void setTitle(@Nullable @Nullable String title)
      Parameters:
      title - Title of the audio as defined by sender or by audio tags.
    • getMimeType

      @Nullable public @Nullable String getMimeType()
      Returns:
      MIME type of the file as defined by sender.
    • setMimeType

      public void setMimeType(@Nullable @Nullable String mimeType)
      Parameters:
      mimeType - MIME type of the file as defined by sender.
    • getFileSize

      @Nullable public @Nullable Long getFileSize()
      Returns:
      File size
    • setFileSize

      public void setFileSize(@Nullable @Nullable Long fileSize)
      Parameters:
      fileSize - File size
    • getThumb

      @Nullable public @Nullable PhotoSize getThumb()
      Returns:
      Thumbnail of the album cover to which the music file belongs.
    • setThumb

      public void setThumb(@Nullable @Nullable PhotoSize thumb)
      Parameters:
      thumb - Thumbnail of the album cover to which the music file belongs.
    • getFileName

      @Nullable public @Nullable String getFileName()
      Returns:
      Original filename as defined by sender.
    • setFileName

      public void setFileName(@Nullable @Nullable String fileName)
      Parameters:
      fileName - Original filename as defined by sender.
    • toString

      public String toString()
      Overrides:
      toString in class Object