/* * Copyright 2010-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; /** *
* Stores information about a callback. *
*/ public class ChannelMessageCallback implements Serializable { /** ** The message ID. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*/
private String messageId;
/**
*
* The message content. 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. *
*
* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
*/
private String content;
/**
*
* The message metadata. *
*
* Constraints:
* Length: 0 - 1024
* Pattern: .*
*/
private String metadata;
/**
*
* The push notification configuration of the message. *
*/ private PushNotificationConfiguration pushNotification; /** ** 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 ID of the SubChannel. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*/
private String subChannelId;
/**
*
* The content type of the call-back message. 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.
*
* Constraints:
* Length: 0 - 45
* Pattern: [\s\S]*
*/
private String contentType;
/**
*
* The message ID. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*
* @return
* The message ID. *
*/ public String getMessageId() { return messageId; } /** ** The message ID. *
*
* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*
* @param messageId
* The message ID. *
*/ public void setMessageId(String messageId) { this.messageId = messageId; } /** ** The message ID. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*
* @param messageId
* The message ID. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ChannelMessageCallback withMessageId(String messageId) { this.messageId = messageId; return this; } /** ** The message content. 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. *
*
* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
*
* @return
* The message content. 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 content; } /** ** The message content. 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. *
*
* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
*
* @param content
* The message content. 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 message content. 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. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 -
* Pattern: [\s\S]*
*
* @param content
* The message content. 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 A reference to this updated object so that method calls can be * chained together. */ public ChannelMessageCallback withContent(String content) { this.content = content; return this; } /** ** The message metadata. *
*
* Constraints:
* Length: 0 - 1024
* Pattern: .*
*
* @return
* The message metadata. *
*/ public String getMetadata() { return metadata; } /** ** The message metadata. *
*
* Constraints:
* Length: 0 - 1024
* Pattern: .*
*
* @param metadata
* The message metadata. *
*/ public void setMetadata(String metadata) { this.metadata = metadata; } /** ** The message metadata. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 0 - 1024
* Pattern: .*
*
* @param metadata
* The message metadata. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ChannelMessageCallback withMetadata(String metadata) { this.metadata = metadata; return this; } /** ** The push notification configuration of the message. *
* * @return* The push notification configuration of the message. *
*/ public PushNotificationConfiguration getPushNotification() { return pushNotification; } /** ** The push notification configuration of the message. *
* * @param pushNotification* The push notification configuration of the message. *
*/ public void setPushNotification(PushNotificationConfiguration pushNotification) { this.pushNotification = pushNotification; } /** ** The push notification configuration of the message. *
** Returns a reference to this object so that method calls can be chained * together. * * @param pushNotification
* The push notification configuration of the message. *
* @return A reference to this updated object so that method calls can be * chained together. */ public ChannelMessageCallback withPushNotification( PushNotificationConfiguration pushNotification) { this.pushNotification = pushNotification; 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. *
** Returns a reference to this object so that method calls can be chained * together. * * @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 A reference to this updated object so that method calls can be * chained together. */ public ChannelMessageCallback withMessageAttributes( 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. *
*
* The method adds a new key-value pair into MessageAttributes parameter,
* and returns a reference to this object so that method calls can be
* chained together.
*
* @param key The key of the entry to be added into MessageAttributes.
* @param value The corresponding value of the entry to be added into
* MessageAttributes.
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ChannelMessageCallback addMessageAttributesEntry(String key, MessageAttributeValue value) {
if (null == this.messageAttributes) {
this.messageAttributes = new java.util.HashMap
* Returns a reference to this object so that method calls can be chained
* together.
*/
public ChannelMessageCallback clearMessageAttributesEntries() {
this.messageAttributes = null;
return this;
}
/**
*
* The ID of the SubChannel.
*
* Constraints:
* The ID of the SubChannel.
*
* The ID of the SubChannel.
*
* Constraints:
* The ID of the SubChannel.
*
* The ID of the SubChannel.
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* The ID of the SubChannel.
*
* The content type of the call-back message. For Amazon Lex V2 bot
* responses, the content type is
*
* Constraints:
* The content type of the call-back message. For Amazon Lex V2 bot
* responses, the content type is
*
* The content type of the call-back message. For Amazon Lex V2 bot
* responses, the content type is
*
* Constraints:
* The content type of the call-back message. For Amazon Lex V2
* bot responses, the content type is
*
* The content type of the call-back message. For Amazon Lex V2 bot
* responses, the content type is
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* The content type of the call-back message. For Amazon Lex V2
* bot responses, the content type is
*
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*
* @return
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*
* @param subChannelId
* Length: 1 - 128
* Pattern: [-_a-zA-Z0-9]*
*
* @param subChannelId 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.
*
* Length: 0 - 45
* Pattern: [\s\S]*
*
* @return 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.
*
* Length: 0 - 45
* Pattern: [\s\S]*
*
* @param contentType 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.
*
* Length: 0 - 45
* Pattern: [\s\S]*
*
* @param contentType 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.
*