MessagingExtensionResult Class

  • java.lang.Object
    • com.microsoft.bot.schema.teams.MessagingExtensionResult

public class MessagingExtensionResult

Messaging extension result.

Constructor Summary

Constructor Description
MessagingExtensionResult()

Method Summary

Modifier and Type Method and Description
Activity getActivityPreview()

Gets (Only when type is botMessagePreview) Message activity.

java.lang.String getAttachmentLayout()

Gets hint for how to deal with multiple attachments.

java.util.List<MessagingExtensionAttachment> getAttachments()

Gets (Only when type is result) Attachments.

MessagingExtensionSuggestedAction getSuggestedActions()

Gets (Only when type is auth or config) suggested actions.

java.lang.String getText()

Gets (Only when type is message) Text.

java.lang.String getType()

Gets the type of the result.

void setActivityPreview(Activity withActivityPreview)

Sets (Only when type is botMessagePreview) Message activity.

void setAttachment(MessagingExtensionAttachment withAttachment)

Sets (Only when type is result) Attachments to the specific attachment.

void setAttachmentLayout(String withAttachmentLayout)

Sets hint for how to deal with multiple attachments.

void setAttachments(List<MessagingExtensionAttachment> withAttachments)

Sets (Only when type is result) Attachments.

void setSuggestedActions(MessagingExtensionSuggestedAction withSuggestedActions)

Sets (Only when type is auth or config) suggested actions.

void setText(String withText)

Sets (Only when type is message) Text.

void setType(String withType)

Sets the type of the result.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

MessagingExtensionResult

public MessagingExtensionResult()

Method Details

getActivityPreview

public Activity getActivityPreview()

Gets (Only when type is botMessagePreview) Message activity.

Returns:

The preview Activity.

getAttachmentLayout

public String getAttachmentLayout()

Gets hint for how to deal with multiple attachments. Possible values include: 'list', 'grid'

Returns:

The attachment layout hint.

getAttachments

public List getAttachments()

Gets (Only when type is result) Attachments.

Returns:

The result attachments.

getSuggestedActions

public MessagingExtensionSuggestedAction getSuggestedActions()

Gets (Only when type is auth or config) suggested actions.

Returns:

The suggested actions.

getText

public String getText()

Gets (Only when type is message) Text.

Returns:

The result text.

getType

public String getType()

Gets the type of the result. Possible values include: 'result', 'auth', 'config', 'message', 'botMessagePreview'

Returns:

The result type.

setActivityPreview

public void setActivityPreview(Activity withActivityPreview)

Sets (Only when type is botMessagePreview) Message activity.

Parameters:

withActivityPreview - The preview Activity.

setAttachment

public void setAttachment(MessagingExtensionAttachment withAttachment)

Sets (Only when type is result) Attachments to the specific attachment. This replaces all previous attachments on the object.

Parameters:

withAttachment - The attachment.

setAttachmentLayout

public void setAttachmentLayout(String withAttachmentLayout)

Sets hint for how to deal with multiple attachments. Possible values include: 'list', 'grid'

Parameters:

withAttachmentLayout - The attachment layout hint.

setAttachments

public void setAttachments(List withAttachments)

Sets (Only when type is result) Attachments. This replaces all previous attachments on the object.

Parameters:

withAttachments - The result attachments.

setSuggestedActions

public void setSuggestedActions(MessagingExtensionSuggestedAction withSuggestedActions)

Sets (Only when type is auth or config) suggested actions.

Parameters:

withSuggestedActions - The suggested actions.

setText

public void setText(String withText)

Sets (Only when type is message) Text.

Parameters:

withText - The result text.

setType

public void setType(String withType)

Sets the type of the result. Possible values include: 'result', 'auth', 'config', 'message', 'botMessagePreview'

Parameters:

withType - The result type.

Applies to