Class MessageContent

java.lang.Object
com.azure.core.models.MessageContent
Direct Known Subclasses:
EventData

public class MessageContent extends Object
An abstraction for a message containing a content type along with its data.
  • Constructor Details

    • MessageContent

      public MessageContent()
  • Method Details

    • 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 MessageContent object.
    • 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 MessageContent object.