Package com.avaya.clientservices.visualvoicemail

## Interface VisualVoiceMailMessage

-     public interface VisualVoiceMailMessage

  Interface for all Visual Voice Mail message related tasks and properties. Applications can mark a massage as read and unread, download audio voicemail file, get information about necessary fields of visual voicemail message by the interface.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `VisualVoiceMailMessage.FileStatus` | Visual voicemail audio file download status.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addListener​(VisualVoiceMailMessageListener listener)` | Adds a listener.
    `java.lang.String` | `consume()` | Returns the location of audio file for consumption and changes audio file status to CONSUMED.
    `CancellableDataRetrieval` | `download​(java.lang.String downloadFilePath, VisualVoiceMailCompletionHandler completionHandler)` | Start the download of the audio voicemail file asynchronously.
    `VisualVoiceMailMessage.FileStatus` | `getAudioFileStatus()` | Get status of audio voicemail file.
    `java.lang.String` | `getCallerAddress()` | Get address of the party that left the voice message.
    `java.lang.String` | `getCallerName()` | Get Name of the party that left the voice message.
    `Capability` | `getConsumeCapability()` | Returns an indication of whether the audio voicemail file can be consumed.
    `Capability` | `getDownloadCapability()` | Returns an indication of whether the audio voicemail file can be downloaded.
    `int` | `getDuration()` | Get the duration of audio voicemail file.
    `java.lang.String` | `getLocation()` | Get the ocation of audio voicemail file.
    `Capability` | `getMarkMessageAsReadCapability()` | Returns a `Capability` object that indicates if the visual voicemail message can be marked as read.
    `Capability` | `getMarkMessageAsUnReadCapability()` | Returns a `Capability` object that indicates if the visual voicemail message can be marked as unread.
    `java.util.Date` | `getReceivedDate()` | Returns the date and time that the visual voicemail message was received.
    `long` | `getSize()` | Get the size of audio voicemail file.
    `java.lang.String` | `getSubject()` | Get subject of the voice message.
    `boolean` | `isRead()` | Get Flag indicating whether or not the message is read.
    `void` | `markAsRead()` | Marks the visual voicemail message as read.
    `void` | `markAsUnRead()` | Marks the visual voicemail message as unread.
    `void` | `removeListener​(VisualVoiceMailMessageListener listener)` | Removes a listener.

- - ### Method Detail

    - #### addListener

          void addListener​(VisualVoiceMailMessageListener listener)

      Adds a listener.
      Parameters:
        `listener` - Listener instance to be added.

    - #### removeListener

          void removeListener​(VisualVoiceMailMessageListener listener)

      Removes a listener.
      Parameters:
        `listener` - Listener instance to be removed.

    - #### markAsRead

          void markAsRead()

      Marks the visual voicemail message as read.

    - #### markAsUnRead

          void markAsUnRead()

      Marks the visual voicemail message as unread.

    - #### download

          CancellableDataRetrieval download​(java.lang.String downloadFilePath,
                                            VisualVoiceMailCompletionHandler completionHandler)

      Start the download of the audio voicemail file asynchronously.
      Parameters:
        `downloadFilePath` - The path to download audio voicemail file.
        `completionHandler` - The `completion handler` which will be invoked when the operation returns.
      Returns:
        Data retrieval cancel object.

    - #### consume

          java.lang.String consume()

      Returns the location of audio file for consumption and changes audio file status to CONSUMED.
      Returns:
        The location of attachment or empty string if location is not available.

    - #### getCallerAddress

          java.lang.String getCallerAddress()

      Get address of the party that left the voice message.
      Returns:
        The address of the party.

    - #### getCallerName

          java.lang.String getCallerName()

      Get Name of the party that left the voice message.
      Returns:
        The name of the party.

    - #### getSubject

          java.lang.String getSubject()

      Get subject of the voice message.
      Returns:
        Subject.

    - #### getReceivedDate

          java.util.Date getReceivedDate()

      Returns the date and time that the visual voicemail message was received.
      Returns:
        The date and time that the message was received.

    - #### isRead

          boolean isRead()

      Get Flag indicating whether or not the message is read.
      Returns:
        True if the message has been read.

    - #### getSize

          long getSize()

      Get the size of audio voicemail file.
      Returns:
        The size of audio file in bytes.

    - #### getDuration

          int getDuration()

      Get the duration of audio voicemail file.
      Returns:
        The duration of audio file in seconds.

    - #### getLocation

          java.lang.String getLocation()

      Get the ocation of audio voicemail file.
      Returns:
        The location of audio file.

    - #### getAudioFileStatus

          VisualVoiceMailMessage.FileStatus getAudioFileStatus()

      Get status of audio voicemail file.
      Returns:
        `status` of audio file.

    - #### getMarkMessageAsReadCapability

          Capability getMarkMessageAsReadCapability()

      Returns a `Capability` object that indicates if the visual voicemail message can be marked as read. This capability is allowed when the visual voicemail service is online (has an active connection to the server).
      Returns:
        A `Capability` object that indicates if the visual voicemail message can be marked as read.
      See Also:
        `markAsUnRead()`

    - #### getMarkMessageAsUnReadCapability

          Capability getMarkMessageAsUnReadCapability()

      Returns a `Capability` object that indicates if the visual voicemail message can be marked as unread. This capability is allowed when the visual voicemail service is online (has an active connection to the server).
      Returns:
        A `Capability` object that indicates if the visual voicemail message can be marked as unread.
      See Also:
        `markAsUnRead()`

    - #### getDownloadCapability

          Capability getDownloadCapability()

      Returns an indication of whether the audio voicemail file can be downloaded.
      Returns:
        A `Capability` object that indicates if the visual voicemail message can be downloaded.
      See Also:
        `download(String, VisualVoiceMailCompletionHandler)`

    - #### getConsumeCapability

          Capability getConsumeCapability()

      Returns an indication of whether the audio voicemail file can be consumed.
      Returns:
        A `Capability` object that indicates if the audio voicemail file can be consumed.
      See Also:
        `consume()`