Attachment Class

  • java.lang.Object
    • com.microsoft.bot.schema.Attachment

public class Attachment

An attachment within an activity.

Constructor Summary

Constructor Description
Attachment()

Method Summary

Modifier and Type Method and Description
static Attachment clone(Attachment attachment)

Performs a deep copy of an Attachment.

static java.util.List<Attachment> cloneList(List<Attachment> attachments)

Clones a List of Attachments.

java.lang.Object getContent()

Get the content value.

java.lang.String getContentType()

Get the contentType value.

java.lang.String getContentUrl()

Get the contentUrl value.

java.lang.String getName()

Get the name value.

java.util.Map<java.lang.String,com.fasterxml.jackson.databind.JsonNode> getProperties()

Overflow properties.

java.lang.String getThumbnailUrl()

Get the thumbnailUrl value.

void setContent(Object withContent)

Set the content value.

void setContentType(String withContentType)

Set the contentType value.

void setContentUrl(String withContentUrl)

Set the contentUrl value.

void setName(String withName)

Set the name value.

void setProperties(String key, JsonNode value)

Set overflow properties.

void setThumbnailUrl(String withThumbnailUrl)

Set the thumbnailUrl value.

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

Attachment

public Attachment()

Method Details

clone

public static Attachment clone(Attachment attachment)

Performs a deep copy of an Attachment.

Parameters:

attachment - The Attachment to copy.

Returns:

A cloned version of the Attachment.

cloneList

public static List cloneList(List attachments)

Clones a List of Attachments.

Parameters:

attachments - The list of Attachments to clone.

Returns:

A new List of cloned Attachments.

getContent

public Object getContent()

Get the content value.

Returns:

the content value

getContentType

public String getContentType()

Get the contentType value.

Returns:

the contentType value

getContentUrl

public String getContentUrl()

Get the contentUrl value.

Returns:

the contentUrl value

getName

public String getName()

Get the name value.

Returns:

the name value

getProperties

public Map getProperties()

Overflow properties. Properties that are not modelled as first class properties in the object are accessible here. Note: A property value can be be nested.

Returns:

A Key-Value map of the properties

getThumbnailUrl

public String getThumbnailUrl()

Get the thumbnailUrl value.

Returns:

the thumbnailUrl value

setContent

public void setContent(Object withContent)

Set the content value.

Parameters:

withContent - the content value to set

setContentType

public void setContentType(String withContentType)

Set the contentType value.

Parameters:

withContentType - the contentType value to set

setContentUrl

public void setContentUrl(String withContentUrl)

Set the contentUrl value.

Parameters:

withContentUrl - the contentUrl value to set

setName

public void setName(String withName)

Set the name value.

Parameters:

withName - the name value to set

setProperties

public void setProperties(String key, JsonNode value)

Set overflow properties.

Parameters:

key - Key for the property
value - JsonNode of value (can be nested)

setThumbnailUrl

public void setThumbnailUrl(String withThumbnailUrl)

Set the thumbnailUrl value.

Parameters:

withThumbnailUrl - the thumbnailUrl value to set

Applies to