Interface Item.Builder

All Superinterfaces:
Buildable, CopyableBuilder<Item.Builder,Item>, SdkBuilder<Item.Builder,Item>, SdkPojo
Enclosing class:
Item

@Mutable @NotThreadSafe public static interface Item.Builder extends SdkPojo, CopyableBuilder<Item.Builder,Item>
  • Method Details

    • absoluteTime

      Item.Builder absoluteTime(String absoluteTime)

      The time when the message or event was sent.

      It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

      Parameters:
      absoluteTime - The time when the message or event was sent.

      It's specified in ISO 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example, 2019-11-08T02:41:28.172Z.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • content

      Item.Builder content(String content)

      The content of the message or event.

      Parameters:
      content - The content of the message or event.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contentType

      Item.Builder contentType(String contentType)

      The type of content of the item.

      Parameters:
      contentType - The type of content of the item.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • id

      The ID of the item.

      Parameters:
      id - The ID of the item.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • type

      Item.Builder type(String type)

      Type of the item: message or event.

      Parameters:
      type - Type of the item: message or event.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • type

      Type of the item: message or event.

      Parameters:
      type - Type of the item: message or event.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • participantId

      Item.Builder participantId(String participantId)

      The ID of the sender in the session.

      Parameters:
      participantId - The ID of the sender in the session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • displayName

      Item.Builder displayName(String displayName)

      The chat display name of the sender.

      Parameters:
      displayName - The chat display name of the sender.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • participantRole

      Item.Builder participantRole(String participantRole)

      The role of the sender. For example, is it a customer, agent, or system.

      Parameters:
      participantRole - The role of the sender. For example, is it a customer, agent, or system.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • participantRole

      Item.Builder participantRole(ParticipantRole participantRole)

      The role of the sender. For example, is it a customer, agent, or system.

      Parameters:
      participantRole - The role of the sender. For example, is it a customer, agent, or system.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • attachments

      Item.Builder attachments(Collection<AttachmentItem> attachments)

      Provides information about the attachments.

      Parameters:
      attachments - Provides information about the attachments.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attachments

      Item.Builder attachments(AttachmentItem... attachments)

      Provides information about the attachments.

      Parameters:
      attachments - Provides information about the attachments.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • attachments

      Item.Builder attachments(Consumer<AttachmentItem.Builder>... attachments)

      Provides information about the attachments.

      This is a convenience method that creates an instance of the AttachmentItem.Builder avoiding the need to create one manually via AttachmentItem.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to attachments(List<AttachmentItem>).

      Parameters:
      attachments - a consumer that will call methods on AttachmentItem.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • messageMetadata

      Item.Builder messageMetadata(MessageMetadata messageMetadata)

      The metadata related to the message. Currently this supports only information related to message receipts.

      Parameters:
      messageMetadata - The metadata related to the message. Currently this supports only information related to message receipts.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • messageMetadata

      default Item.Builder messageMetadata(Consumer<MessageMetadata.Builder> messageMetadata)

      The metadata related to the message. Currently this supports only information related to message receipts.

      This is a convenience method that creates an instance of the MessageMetadata.Builder avoiding the need to create one manually via MessageMetadata.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to messageMetadata(MessageMetadata).

      Parameters:
      messageMetadata - a consumer that will call methods on MessageMetadata.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • relatedContactId

      Item.Builder relatedContactId(String relatedContactId)

      The contactId on which the transcript item was originally sent. This field is only populated for persistent chats when the transcript item is from the past chat session. For more information, see Enable persistent chat.

      Parameters:
      relatedContactId - The contactId on which the transcript item was originally sent. This field is only populated for persistent chats when the transcript item is from the past chat session. For more information, see Enable persistent chat.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • contactId

      Item.Builder contactId(String contactId)

      The contactId on which the transcript item was originally sent. This field is populated only when the transcript item is from the current chat session.

      Parameters:
      contactId - The contactId on which the transcript item was originally sent. This field is populated only when the transcript item is from the current chat session.
      Returns:
      Returns a reference to this object so that method calls can be chained together.