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