Package com.avaya.core

## Class ConversationEvent

- java.lang.Object
- - com.avaya.core.ConversationEvent

- All Implemented Interfaces:
    `java.io.Serializable`

      public final class ConversationEvent
      extends java.lang.Object
      implements java.io.Serializable

  Object representing a conversation event.
  See Also:
    `ConversationEventType`, Serialized Form

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getAvatarUrl()` | Returns the avatar URL of the participant related to this event if this event type is `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` or `ConversationEventType.TYPING_STOP`.
    `java.lang.String` | `getConversationId()` | Returns the ID of the parent conversation of this event.
    `java.util.Date` | `getLastRead()` | Returns the date of the last read message if this event type is `ConversationEventType.CONVERSATION_READ`.
    `java.lang.String` | `getName()` | Returns the name of the participant related to this event if this event type is `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` or `ConversationEventType.TYPING_STOP`.
    `java.lang.String` | `getRole()` | Returns the role of the participant related to this event (typically "appUser" or "business") if this event type is `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` or `ConversationEventType.TYPING_STOP`.
    `ConversationEventType` | `getType()` | The type of event that is being triggered.
    `java.lang.String` | `getUserId()` | Always available for `ConversationEventType.PARTICIPANT_ADDED` and `ConversationEventType.PARTICIPANT_REMOVED`.

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

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

- - ### Method Detail

    - #### getConversationId

          public java.lang.String getConversationId()

      Returns the ID of the parent conversation of this event.
      Returns:
        the ID of the parent conversation of this event

    - #### getType

          public ConversationEventType getType()

      The type of event that is being triggered. See `ConversationEventType` for possible types
      Returns:
        The activity type

    - #### getUserId

          public java.lang.String getUserId()

      Always available for `ConversationEventType.PARTICIPANT_ADDED` and `ConversationEventType.PARTICIPANT_REMOVED`.

      Available for `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` and `ConversationEventType.TYPING_STOP` if they were triggered by another app user.

      Returns:
        the user ID if available, null otherwise

    - #### getRole

          public java.lang.String getRole()

      Returns the role of the participant related to this event (typically "appUser" or "business") if this event type is `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` or `ConversationEventType.TYPING_STOP`.
      Returns:
        the role of the participant related to this event, or null if this event has no related participants

    - #### getName

          public java.lang.String getName()

      Returns the name of the participant related to this event if this event type is `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` or `ConversationEventType.TYPING_STOP`.
      Returns:
        the name of the participant related to this event, or null if this event has no related participants

    - #### getAvatarUrl

          public java.lang.String getAvatarUrl()

      Returns the avatar URL of the participant related to this event if this event type is `ConversationEventType.CONVERSATION_READ`, `ConversationEventType.TYPING_START` or `ConversationEventType.TYPING_STOP`.
      Returns:
        the avatar URL of the participant related to this event, or null if this event has no related participants

    - #### getLastRead

          public java.util.Date getLastRead()

      Returns the date of the last read message if this event type is `ConversationEventType.CONVERSATION_READ`.
      Returns:
        the date of the last read message if applicable to this event, null otherwise