public class Item
extends java.lang.Object
implements java.io.Serializable
An item - message or event - that has been sent.
| Constructor and Description |
|---|
Item() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAbsoluteTime()
The time when the message or event was sent.
|
java.util.List<AttachmentItem> |
getAttachments()
Provides information about the attachments.
|
java.lang.String |
getContactId()
The contactId on which the transcript item was originally sent.
|
java.lang.String |
getContent()
The content of the message or event.
|
java.lang.String |
getContentType()
The type of content of the item.
|
java.lang.String |
getDisplayName()
The chat display name of the sender.
|
java.lang.String |
getId()
The ID of the item.
|
MessageMetadata |
getMessageMetadata()
The metadata related to the message.
|
java.lang.String |
getParticipantId()
The ID of the sender in the session.
|
java.lang.String |
getParticipantRole()
The role of the sender.
|
java.lang.String |
getRelatedContactId()
The contactId on which the transcript item was originally sent.
|
java.lang.String |
getType()
Type of the item: message or event.
|
int |
hashCode() |
void |
setAbsoluteTime(java.lang.String absoluteTime)
The time when the message or event was sent.
|
void |
setAttachments(java.util.Collection<AttachmentItem> attachments)
Provides information about the attachments.
|
void |
setContactId(java.lang.String contactId)
The contactId on which the transcript item was originally sent.
|
void |
setContent(java.lang.String content)
The content of the message or event.
|
void |
setContentType(java.lang.String contentType)
The type of content of the item.
|
void |
setDisplayName(java.lang.String displayName)
The chat display name of the sender.
|
void |
setId(java.lang.String id)
The ID of the item.
|
void |
setMessageMetadata(MessageMetadata messageMetadata)
The metadata related to the message.
|
void |
setParticipantId(java.lang.String participantId)
The ID of the sender in the session.
|
void |
setParticipantRole(ParticipantRole participantRole)
The role of the sender.
|
void |
setParticipantRole(java.lang.String participantRole)
The role of the sender.
|
void |
setRelatedContactId(java.lang.String relatedContactId)
The contactId on which the transcript item was originally sent.
|
void |
setType(ChatItemType type)
Type of the item: message or event.
|
void |
setType(java.lang.String type)
Type of the item: message or event.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Item |
withAbsoluteTime(java.lang.String absoluteTime)
The time when the message or event was sent.
|
Item |
withAttachments(AttachmentItem... attachments)
Provides information about the attachments.
|
Item |
withAttachments(java.util.Collection<AttachmentItem> attachments)
Provides information about the attachments.
|
Item |
withContactId(java.lang.String contactId)
The contactId on which the transcript item was originally sent.
|
Item |
withContent(java.lang.String content)
The content of the message or event.
|
Item |
withContentType(java.lang.String contentType)
The type of content of the item.
|
Item |
withDisplayName(java.lang.String displayName)
The chat display name of the sender.
|
Item |
withId(java.lang.String id)
The ID of the item.
|
Item |
withMessageMetadata(MessageMetadata messageMetadata)
The metadata related to the message.
|
Item |
withParticipantId(java.lang.String participantId)
The ID of the sender in the session.
|
Item |
withParticipantRole(ParticipantRole participantRole)
The role of the sender.
|
Item |
withParticipantRole(java.lang.String participantRole)
The role of the sender.
|
Item |
withRelatedContactId(java.lang.String relatedContactId)
The contactId on which the transcript item was originally sent.
|
Item |
withType(ChatItemType type)
Type of the item: message or event.
|
Item |
withType(java.lang.String type)
Type of the item: message or event.
|
public java.lang.String getAbsoluteTime()
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.
Constraints:
Length: 1 - 100
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.
public void setAbsoluteTime(java.lang.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.
Constraints:
Length: 1 - 100
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.
public Item withAbsoluteTime(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 100
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.
public java.lang.String getContent()
The content of the message or event.
Constraints:
Length: 1 - 16384
The content of the message or event.
public void setContent(java.lang.String content)
The content of the message or event.
Constraints:
Length: 1 - 16384
content - The content of the message or event.
public Item withContent(java.lang.String content)
The content of the message or event.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 16384
content - The content of the message or event.
public java.lang.String getContentType()
The type of content of the item.
Constraints:
Length: 1 - 100
The type of content of the item.
public void setContentType(java.lang.String contentType)
The type of content of the item.
Constraints:
Length: 1 - 100
contentType - The type of content of the item.
public Item withContentType(java.lang.String contentType)
The type of content of the item.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 100
contentType - The type of content of the item.
public java.lang.String getId()
The ID of the item.
Constraints:
Length: 1 - 256
The ID of the item.
public void setId(java.lang.String id)
The ID of the item.
Constraints:
Length: 1 - 256
id - The ID of the item.
public Item withId(java.lang.String id)
The ID of the item.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
id - The ID of the item.
public java.lang.String getType()
Type of the item: message or event.
Constraints:
Allowed Values: TYPING, PARTICIPANT_JOINED, PARTICIPANT_LEFT,
CHAT_ENDED, TRANSFER_SUCCEEDED, TRANSFER_FAILED, MESSAGE, EVENT,
ATTACHMENT, CONNECTION_ACK, MESSAGE_DELIVERED, MESSAGE_READ
Type of the item: message or event.
ChatItemTypepublic void setType(java.lang.String type)
Type of the item: message or event.
Constraints:
Allowed Values: TYPING, PARTICIPANT_JOINED, PARTICIPANT_LEFT,
CHAT_ENDED, TRANSFER_SUCCEEDED, TRANSFER_FAILED, MESSAGE, EVENT,
ATTACHMENT, CONNECTION_ACK, MESSAGE_DELIVERED, MESSAGE_READ
type - Type of the item: message or event.
ChatItemTypepublic Item withType(java.lang.String type)
Type of the item: message or event.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TYPING, PARTICIPANT_JOINED, PARTICIPANT_LEFT,
CHAT_ENDED, TRANSFER_SUCCEEDED, TRANSFER_FAILED, MESSAGE, EVENT,
ATTACHMENT, CONNECTION_ACK, MESSAGE_DELIVERED, MESSAGE_READ
type - Type of the item: message or event.
ChatItemTypepublic void setType(ChatItemType type)
Type of the item: message or event.
Constraints:
Allowed Values: TYPING, PARTICIPANT_JOINED, PARTICIPANT_LEFT,
CHAT_ENDED, TRANSFER_SUCCEEDED, TRANSFER_FAILED, MESSAGE, EVENT,
ATTACHMENT, CONNECTION_ACK, MESSAGE_DELIVERED, MESSAGE_READ
type - Type of the item: message or event.
ChatItemTypepublic Item withType(ChatItemType type)
Type of the item: message or event.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: TYPING, PARTICIPANT_JOINED, PARTICIPANT_LEFT,
CHAT_ENDED, TRANSFER_SUCCEEDED, TRANSFER_FAILED, MESSAGE, EVENT,
ATTACHMENT, CONNECTION_ACK, MESSAGE_DELIVERED, MESSAGE_READ
type - Type of the item: message or event.
ChatItemTypepublic java.lang.String getParticipantId()
The ID of the sender in the session.
Constraints:
Length: 1 - 256
The ID of the sender in the session.
public void setParticipantId(java.lang.String participantId)
The ID of the sender in the session.
Constraints:
Length: 1 - 256
participantId - The ID of the sender in the session.
public Item withParticipantId(java.lang.String participantId)
The ID of the sender in the session.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
participantId - The ID of the sender in the session.
public java.lang.String getDisplayName()
The chat display name of the sender.
Constraints:
Length: 1 - 256
The chat display name of the sender.
public void setDisplayName(java.lang.String displayName)
The chat display name of the sender.
Constraints:
Length: 1 - 256
displayName - The chat display name of the sender.
public Item withDisplayName(java.lang.String displayName)
The chat display name of the sender.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
displayName - The chat display name of the sender.
public java.lang.String getParticipantRole()
The role of the sender. For example, is it a customer, agent, or system.
Constraints:
Allowed Values: AGENT, CUSTOMER, SYSTEM, CUSTOM_BOT
The role of the sender. For example, is it a customer, agent, or system.
ParticipantRolepublic void setParticipantRole(java.lang.String participantRole)
The role of the sender. For example, is it a customer, agent, or system.
Constraints:
Allowed Values: AGENT, CUSTOMER, SYSTEM, CUSTOM_BOT
participantRole - The role of the sender. For example, is it a customer, agent, or system.
ParticipantRolepublic Item withParticipantRole(java.lang.String participantRole)
The role of the sender. For example, is it a customer, agent, or system.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: AGENT, CUSTOMER, SYSTEM, CUSTOM_BOT
participantRole - The role of the sender. For example, is it a customer, agent, or system.
ParticipantRolepublic void setParticipantRole(ParticipantRole participantRole)
The role of the sender. For example, is it a customer, agent, or system.
Constraints:
Allowed Values: AGENT, CUSTOMER, SYSTEM, CUSTOM_BOT
participantRole - The role of the sender. For example, is it a customer, agent, or system.
ParticipantRolepublic Item withParticipantRole(ParticipantRole participantRole)
The role of the sender. For example, is it a customer, agent, or system.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: AGENT, CUSTOMER, SYSTEM, CUSTOM_BOT
participantRole - The role of the sender. For example, is it a customer, agent, or system.
ParticipantRolepublic java.util.List<AttachmentItem> getAttachments()
Provides information about the attachments.
Provides information about the attachments.
public void setAttachments(java.util.Collection<AttachmentItem> attachments)
Provides information about the attachments.
attachments - Provides information about the attachments.
public Item withAttachments(AttachmentItem... attachments)
Provides information about the attachments.
Returns a reference to this object so that method calls can be chained together.
attachments - Provides information about the attachments.
public Item withAttachments(java.util.Collection<AttachmentItem> attachments)
Provides information about the attachments.
Returns a reference to this object so that method calls can be chained together.
attachments - Provides information about the attachments.
public MessageMetadata getMessageMetadata()
The metadata related to the message. Currently this supports only information related to message receipts.
The metadata related to the message. Currently this supports only information related to message receipts.
public void setMessageMetadata(MessageMetadata messageMetadata)
The metadata related to the message. Currently this supports only information related to message receipts.
messageMetadata - The metadata related to the message. Currently this supports only information related to message receipts.
public Item withMessageMetadata(MessageMetadata messageMetadata)
The metadata related to the message. Currently this supports only information related to message receipts.
Returns a reference to this object so that method calls can be chained together.
messageMetadata - The metadata related to the message. Currently this supports only information related to message receipts.
public java.lang.String getRelatedContactId()
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.
Constraints:
Length: 1 - 256
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.
public void setRelatedContactId(java.lang.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.
Constraints:
Length: 1 - 256
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.
public Item withRelatedContactId(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
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.
public java.lang.String getContactId()
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.
Constraints:
Length: 1 - 256
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.
public void setContactId(java.lang.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.
Constraints:
Length: 1 - 256
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.
public Item withContactId(java.lang.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.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
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.
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object