/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.chimesdkmessaging.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Summary of the messages in a Channel
.
*
* The ID of the message. *
*/ private String messageId; /** ** The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
*/ private String content; /** ** The metadata of the message. *
*/ private String metadata; /** ** The type of message. *
*/ private String type; /** ** The time at which the message summary was created. *
*/ private java.util.Date createdTimestamp; /** ** The time at which a message was last updated. *
*/ private java.util.Date lastUpdatedTimestamp; /** ** The time at which a message was last edited. *
*/ private java.util.Date lastEditedTimestamp; /** ** The message sender. *
*/ private Identity sender; /** ** Indicates whether a message was redacted. *
*/ private Boolean redacted; /** *
* The message status. The status value is SENT
for messages sent to a channel without a channel flow.
* For channels associated with channel flow, the value determines the processing stage.
*
* The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific * fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
*/ private java.util.Map
* The content type of the channel message listed in the summary. For Amazon Lex V2 bot responses, the content type
* is application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
*
* The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. * Only users who can see targeted messages can take actions on them. However, administrators can delete targeted * messages that they can’t see. *
*/ private java.util.List* The ID of the message. *
* * @param messageId * The ID of the message. */ public void setMessageId(String messageId) { this.messageId = messageId; } /** ** The ID of the message. *
* * @return The ID of the message. */ public String getMessageId() { return this.messageId; } /** ** The ID of the message. *
* * @param messageId * The ID of the message. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withMessageId(String messageId) { setMessageId(messageId); return this; } /** ** The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
* * @param content * The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. */ public void setContent(String content) { this.content = content; } /** ** The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
* * @return The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. */ public String getContent() { return this.content; } /** ** The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
* * @param content * The content of the channel message. For Amazon Lex V2 bot responses, this field holds a list of messages * originating from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withContent(String content) { setContent(content); return this; } /** ** The metadata of the message. *
* * @param metadata * The metadata of the message. */ public void setMetadata(String metadata) { this.metadata = metadata; } /** ** The metadata of the message. *
* * @return The metadata of the message. */ public String getMetadata() { return this.metadata; } /** ** The metadata of the message. *
* * @param metadata * The metadata of the message. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withMetadata(String metadata) { setMetadata(metadata); return this; } /** ** The type of message. *
* * @param type * The type of message. * @see ChannelMessageType */ public void setType(String type) { this.type = type; } /** ** The type of message. *
* * @return The type of message. * @see ChannelMessageType */ public String getType() { return this.type; } /** ** The type of message. *
* * @param type * The type of message. * @return Returns a reference to this object so that method calls can be chained together. * @see ChannelMessageType */ public ChannelMessageSummary withType(String type) { setType(type); return this; } /** ** The type of message. *
* * @param type * The type of message. * @return Returns a reference to this object so that method calls can be chained together. * @see ChannelMessageType */ public ChannelMessageSummary withType(ChannelMessageType type) { this.type = type.toString(); return this; } /** ** The time at which the message summary was created. *
* * @param createdTimestamp * The time at which the message summary was created. */ public void setCreatedTimestamp(java.util.Date createdTimestamp) { this.createdTimestamp = createdTimestamp; } /** ** The time at which the message summary was created. *
* * @return The time at which the message summary was created. */ public java.util.Date getCreatedTimestamp() { return this.createdTimestamp; } /** ** The time at which the message summary was created. *
* * @param createdTimestamp * The time at which the message summary was created. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withCreatedTimestamp(java.util.Date createdTimestamp) { setCreatedTimestamp(createdTimestamp); return this; } /** ** The time at which a message was last updated. *
* * @param lastUpdatedTimestamp * The time at which a message was last updated. */ public void setLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) { this.lastUpdatedTimestamp = lastUpdatedTimestamp; } /** ** The time at which a message was last updated. *
* * @return The time at which a message was last updated. */ public java.util.Date getLastUpdatedTimestamp() { return this.lastUpdatedTimestamp; } /** ** The time at which a message was last updated. *
* * @param lastUpdatedTimestamp * The time at which a message was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) { setLastUpdatedTimestamp(lastUpdatedTimestamp); return this; } /** ** The time at which a message was last edited. *
* * @param lastEditedTimestamp * The time at which a message was last edited. */ public void setLastEditedTimestamp(java.util.Date lastEditedTimestamp) { this.lastEditedTimestamp = lastEditedTimestamp; } /** ** The time at which a message was last edited. *
* * @return The time at which a message was last edited. */ public java.util.Date getLastEditedTimestamp() { return this.lastEditedTimestamp; } /** ** The time at which a message was last edited. *
* * @param lastEditedTimestamp * The time at which a message was last edited. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withLastEditedTimestamp(java.util.Date lastEditedTimestamp) { setLastEditedTimestamp(lastEditedTimestamp); return this; } /** ** The message sender. *
* * @param sender * The message sender. */ public void setSender(Identity sender) { this.sender = sender; } /** ** The message sender. *
* * @return The message sender. */ public Identity getSender() { return this.sender; } /** ** The message sender. *
* * @param sender * The message sender. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withSender(Identity sender) { setSender(sender); return this; } /** ** Indicates whether a message was redacted. *
* * @param redacted * Indicates whether a message was redacted. */ public void setRedacted(Boolean redacted) { this.redacted = redacted; } /** ** Indicates whether a message was redacted. *
* * @return Indicates whether a message was redacted. */ public Boolean getRedacted() { return this.redacted; } /** ** Indicates whether a message was redacted. *
* * @param redacted * Indicates whether a message was redacted. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withRedacted(Boolean redacted) { setRedacted(redacted); return this; } /** ** Indicates whether a message was redacted. *
* * @return Indicates whether a message was redacted. */ public Boolean isRedacted() { return this.redacted; } /** *
* The message status. The status value is SENT
for messages sent to a channel without a channel flow.
* For channels associated with channel flow, the value determines the processing stage.
*
SENT
for messages sent to a channel without a channel
* flow. For channels associated with channel flow, the value determines the processing stage.
*/
public void setStatus(ChannelMessageStatusStructure status) {
this.status = status;
}
/**
*
* The message status. The status value is SENT
for messages sent to a channel without a channel flow.
* For channels associated with channel flow, the value determines the processing stage.
*
SENT
for messages sent to a channel without a
* channel flow. For channels associated with channel flow, the value determines the processing stage.
*/
public ChannelMessageStatusStructure getStatus() {
return this.status;
}
/**
*
* The message status. The status value is SENT
for messages sent to a channel without a channel flow.
* For channels associated with channel flow, the value determines the processing stage.
*
SENT
for messages sent to a channel without a channel
* flow. For channels associated with channel flow, the value determines the processing stage.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChannelMessageSummary withStatus(ChannelMessageStatusStructure status) {
setStatus(status);
return this;
}
/**
* * The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific * fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
* * @return The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to * specific fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. */ public java.util.Map* The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific * fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
* * @param messageAttributes * The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to * specific fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. */ public void setMessageAttributes(java.util.Map* The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to specific * fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. *
* * @param messageAttributes * The attributes for the channel message. For Amazon Lex V2 bot responses, the attributes are mapped to * specific fields from the bot. For more information, refer to Processing * responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withMessageAttributes(java.util.Map
* The content type of the channel message listed in the summary. For Amazon Lex V2 bot responses, the content type
* is application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
*
application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
*/
public void setContentType(String contentType) {
this.contentType = contentType;
}
/**
*
* The content type of the channel message listed in the summary. For Amazon Lex V2 bot responses, the content type
* is application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
*
application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
*/
public String getContentType() {
return this.contentType;
}
/**
*
* The content type of the channel message listed in the summary. For Amazon Lex V2 bot responses, the content type
* is application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
*
application/amz-chime-lex-msgs
for success responses and
* application/amz-chime-lex-error
for failure responses. For more information, refer to Processing
* responses from an AppInstanceBot in the Amazon Chime SDK Messaging Developer Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ChannelMessageSummary withContentType(String contentType) {
setContentType(contentType);
return this;
}
/**
* * The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. * Only users who can see targeted messages can take actions on them. However, administrators can delete targeted * messages that they can’t see. *
* * @return The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. However, administrators can * delete targeted messages that they can’t see. */ public java.util.List* The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. * Only users who can see targeted messages can take actions on them. However, administrators can delete targeted * messages that they can’t see. *
* * @param target * The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. However, administrators can * delete targeted messages that they can’t see. */ public void setTarget(java.util.Collection* The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. * Only users who can see targeted messages can take actions on them. However, administrators can delete targeted * messages that they can’t see. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTarget(java.util.Collection)} or {@link #withTarget(java.util.Collection)} if you want to override the * existing values. *
* * @param target * The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. However, administrators can * delete targeted messages that they can’t see. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withTarget(Target... target) { if (this.target == null) { setTarget(new java.util.ArrayList* The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted messages. * Only users who can see targeted messages can take actions on them. However, administrators can delete targeted * messages that they can’t see. *
* * @param target * The target of a message, a sender, a user, or a bot. Only the target and the sender can view targeted * messages. Only users who can see targeted messages can take actions on them. However, administrators can * delete targeted messages that they can’t see. * @return Returns a reference to this object so that method calls can be chained together. */ public ChannelMessageSummary withTarget(java.util.Collection