Package com.azure.core.models
Class MessageContent
- java.lang.Object
-
- com.azure.core.models.MessageContent
-
public class MessageContent extends Object
An abstraction for a message containing a content type along with its data.
-
-
Constructor Summary
Constructors Constructor Description MessageContent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryDatagetBodyAsBinaryData()Gets the message body.StringgetContentType()Gets the content type.MessageContentsetBodyAsBinaryData(BinaryData binaryData)Sets the message body.MessageContentsetContentType(String contentType)Sets the content type.
-
-
-
Method Detail
-
getBodyAsBinaryData
public BinaryData getBodyAsBinaryData()
Gets the message body.- Returns:
- The message body.
-
setBodyAsBinaryData
public MessageContent setBodyAsBinaryData(BinaryData binaryData)
Sets the message body.- Parameters:
binaryData- The message body.- Returns:
- The updated
MessageContentobject.
-
getContentType
public String getContentType()
Gets the content type.- Returns:
- The content type.
-
setContentType
public MessageContent setContentType(String contentType)
Sets the content type.- Parameters:
contentType- The content type.- Returns:
- The updated
MessageContentobject.
-
-