com.sinch.sdk.domains.conversation.models.v1.messages.AppMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
package com.sinch.sdk.domains.conversation.models.v1.messages;
import com.sinch.sdk.domains.conversation.models.v1.Agent;
import com.sinch.sdk.domains.conversation.models.v1.ConversationChannel;
import com.sinch.sdk.domains.conversation.models.v1.messages.types.channelspecific.ChannelSpecificMessage;
import java.util.Map;
/**
* Message originating from an app
*
* @param Body type for message
* @since 1.3
*/
public interface AppMessage extends ConversationMessageBody {
/**
* Get message body
*
* @return Message body
*/
T getBody();
/**
* Channel specific messages, overriding any transcoding. The key in the map must point to a valid
* conversation channel as defined in the enum `ConversationChannel`.
*
* @return explicitChannelMessage
*/
Map getExplicitChannelMessage();
/**
* The option to override the omni-channel template configuration with a channel-specific template
* (for channels on which channel-specific templates can be created. For more information, see
* [Channel Specific
* Templates](../../../../../conversation/templates/#channel-specific-templates)).
*
* @return explicitChannelOmniMessage
*/
Map
getExplicitChannelOmniMessage();
/**
* Channel specific messages, overriding any transcoding. The structure of this property is more
* well-defined than the open structure of the `explicit_channel_message` property, and
* may be easier to use. The key in the map must point to a valid conversation channel as defined
* in the enum `ConversationChannel`.
*
* @return channelSpecificMessage
*/
Map getChannelSpecificMessage();
/**
* Get agent
*
* @return agent
*/
Agent getAgent();
/**
* Getting Builder
*
* @return New Builder instance
* @since 1.0
*/
static Builder builder() {
return new AppMessageImpl.Builder<>();
}
/** Dedicated Builder */
interface Builder {
/**
* see getter
*
* @param message see getter
* @return Current builder
* @see #getBody()
*/
Builder setBody(T message);
/**
* see getter
*
* @param explicitChannelMessage see getter
* @return Current builder
* @see #getExplicitChannelMessage
*/
Builder setExplicitChannelMessage(Map explicitChannelMessage);
/**
* see getter
*
* @param explicitChannelOmniMessage see getter
* @return Current builder
* @see #getExplicitChannelOmniMessage
*/
Builder setExplicitChannelOmniMessage(
Map
explicitChannelOmniMessage);
/**
* see getter
*
* @param channelSpecificMessage see getter
* @return Current builder
* @see #getChannelSpecificMessage
*/
Builder setChannelSpecificMessage(
Map channelSpecificMessage);
/**
* see getter
*
* @param agent see getter
* @return Current builder
* @see #getAgent
*/
Builder setAgent(Agent agent);
AppMessage build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy