你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
MicrosoftGraphChatMessageAttachment Class
- java.
lang. Object - com.
azure. resourcemanager. authorization. fluent. models. MicrosoftGraphChatMessageAttachment
- com.
Implements
public final class MicrosoftGraphChatMessageAttachment
implements JsonSerializable<MicrosoftGraphChatMessageAttachment>
chatMessageAttachment.
Constructor Summary
Constructor | Description |
---|---|
MicrosoftGraphChatMessageAttachment() |
Creates an instance of Microsoft |
Method Summary
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
additionalProperties()
Get the additional |
String |
content()
Get the content property: The content of the attachment. |
String |
contentType()
Get the content |
String |
contentUrl()
Get the content |
static
Microsoft |
fromJson(JsonReader jsonReader)
Reads an instance of Microsoft |
String |
id()
Get the id property: Read-only. |
String |
name()
Get the name property: Name of the attachment. |
String |
thumbnailUrl()
Get the thumbnail |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Microsoft |
withAdditionalProperties(Map<String,Object> additionalProperties)
Set the additional |
Microsoft |
withContent(String content)
Set the content property: The content of the attachment. |
Microsoft |
withContentType(String contentType)
Set the content |
Microsoft |
withContentUrl(String contentUrl)
Set the content |
Microsoft |
withId(String id)
Set the id property: Read-only. |
Microsoft |
withName(String name)
Set the name property: Name of the attachment. |
Microsoft |
withThumbnailUrl(String thumbnailUrl)
Set the thumbnail |
Methods inherited from java.lang.Object
Constructor Details
MicrosoftGraphChatMessageAttachment
public MicrosoftGraphChatMessageAttachment()
Creates an instance of MicrosoftGraphChatMessageAttachment class.
Method Details
additionalProperties
public Map
Get the additionalProperties property: chatMessageAttachment.
Returns:
content
public String content()
Get the content property: The content of the attachment. If the attachment is a rich card, set the property to the rich card object. This property and contentUrl are mutually exclusive.
Returns:
contentType
public String contentType()
Get the contentType property: The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.file: Raw file attachment. Populate the contenturl field with the base64 encoding of the file in data: format.image/: Image type with the type of the image specified ex: image/png, image/jpeg, image/gif. Populate the contentUrl field with the base64 encoding of the file in data: format.video/: Video type with the format specified. Ex: video/mp4. Populate the contentUrl field with the base64 encoding of the file in data: format.audio/: Audio type with the format specified. Ex: audio/wmw. Populate the contentUrl field with the base64 encoding of the file in data: format.application/card type: Rich card attachment type with the card type specifying the exact card format to use. Set content with the json format of the card. Supported values for card type include:application/vnd.microsoft.card.adaptive: A rich card that can contain any combination of text, speech, images,,buttons, and input fields. Set the content property to,an AdaptiveCard object.application/vnd.microsoft.card.animation: A rich card that plays animation. Set the content property,to an AnimationCardobject.application/vnd.microsoft.card.audio: A rich card that plays audio files. Set the content property,to an AudioCard object.application/vnd.microsoft.card.video: A rich card that plays videos. Set the content property,to a VideoCard object.application/vnd.microsoft.card.hero: A Hero card. Set the content property to a HeroCard object.application/vnd.microsoft.card.thumbnail: A Thumbnail card. Set the content property to a ThumbnailCard object.application/vnd.microsoft.com.card.receipt: A Receipt card. Set the content property to a ReceiptCard object.application/vnd.microsoft.com.card.signin: A user Sign In card. Set the content property to a SignInCard object.
Returns:
contentUrl
public String contentUrl()
Get the contentUrl property: URL for the content of the attachment. Supported protocols: http, https, file and data.
Returns:
fromJson
public static MicrosoftGraphChatMessageAttachment fromJson(JsonReader jsonReader)
Reads an instance of MicrosoftGraphChatMessageAttachment from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Read-only. Unique id of the attachment.
Returns:
name
public String name()
Get the name property: Name of the attachment.
Returns:
thumbnailUrl
public String thumbnailUrl()
Get the thumbnailUrl property: URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user clicks the image, the channel would open the document.
Returns:
toJson
validate
public void validate()
Validates the instance.
withAdditionalProperties
public MicrosoftGraphChatMessageAttachment withAdditionalProperties(Map
Set the additionalProperties property: chatMessageAttachment.
Parameters:
Returns:
withContent
public MicrosoftGraphChatMessageAttachment withContent(String content)
Set the content property: The content of the attachment. If the attachment is a rich card, set the property to the rich card object. This property and contentUrl are mutually exclusive.
Parameters:
Returns:
withContentType
public MicrosoftGraphChatMessageAttachment withContentType(String contentType)
Set the contentType property: The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.file: Raw file attachment. Populate the contenturl field with the base64 encoding of the file in data: format.image/: Image type with the type of the image specified ex: image/png, image/jpeg, image/gif. Populate the contentUrl field with the base64 encoding of the file in data: format.video/: Video type with the format specified. Ex: video/mp4. Populate the contentUrl field with the base64 encoding of the file in data: format.audio/: Audio type with the format specified. Ex: audio/wmw. Populate the contentUrl field with the base64 encoding of the file in data: format.application/card type: Rich card attachment type with the card type specifying the exact card format to use. Set content with the json format of the card. Supported values for card type include:application/vnd.microsoft.card.adaptive: A rich card that can contain any combination of text, speech, images,,buttons, and input fields. Set the content property to,an AdaptiveCard object.application/vnd.microsoft.card.animation: A rich card that plays animation. Set the content property,to an AnimationCardobject.application/vnd.microsoft.card.audio: A rich card that plays audio files. Set the content property,to an AudioCard object.application/vnd.microsoft.card.video: A rich card that plays videos. Set the content property,to a VideoCard object.application/vnd.microsoft.card.hero: A Hero card. Set the content property to a HeroCard object.application/vnd.microsoft.card.thumbnail: A Thumbnail card. Set the content property to a ThumbnailCard object.application/vnd.microsoft.com.card.receipt: A Receipt card. Set the content property to a ReceiptCard object.application/vnd.microsoft.com.card.signin: A user Sign In card. Set the content property to a SignInCard object.
Parameters:
Returns:
withContentUrl
public MicrosoftGraphChatMessageAttachment withContentUrl(String contentUrl)
Set the contentUrl property: URL for the content of the attachment. Supported protocols: http, https, file and data.
Parameters:
Returns:
withId
public MicrosoftGraphChatMessageAttachment withId(String id)
Set the id property: Read-only. Unique id of the attachment.
Parameters:
Returns:
withName
public MicrosoftGraphChatMessageAttachment withName(String name)
Set the name property: Name of the attachment.
Parameters:
Returns:
withThumbnailUrl
public MicrosoftGraphChatMessageAttachment withThumbnailUrl(String thumbnailUrl)
Set the thumbnailUrl property: URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user clicks the image, the channel would open the document.
Parameters:
Returns: