Class MediaNotificationContent

java.lang.Object
com.azure.communication.messages.models.NotificationContent
com.azure.communication.messages.models.MediaNotificationContent
All Implemented Interfaces:
com.azure.json.JsonSerializable<NotificationContent>

@Deprecated public final class MediaNotificationContent extends NotificationContent
Deprecated.
A request to send an image notification.
  • Constructor Details

    • MediaNotificationContent

      public MediaNotificationContent(String channelRegistrationId, List<String> to, String mediaUrl)
      Deprecated.
      Creates an instance of MediaNotificationContent class.
      Parameters:
      channelRegistrationId - the channelRegistrationId value to set.
      to - the to value to set.
      mediaUrl - the mediaUrl value to set.
  • Method Details

    • getKind

      public CommunicationMessageKind getKind()
      Deprecated.
      Get the kind property: The type discriminator describing a notification type.
      Overrides:
      getKind in class NotificationContent
      Returns:
      the kind value.
    • getContent

      public String getContent()
      Deprecated.
      Get the content property: Optional text content.
      Returns:
      the content value.
    • setContent

      public MediaNotificationContent setContent(String content)
      Deprecated.
      Set the content property: Optional text content.
      Parameters:
      content - the content value to set.
      Returns:
      the MediaNotificationContent object itself.
    • getMediaUrl

      public String getMediaUrl()
      Deprecated.
      Get the mediaUrl property: A media url for the file. Required if the type is one of the supported media types, e.g. image.
      Returns:
      the mediaUrl value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Deprecated.
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<NotificationContent>
      Overrides:
      toJson in class NotificationContent
      Throws:
      IOException
    • fromJson

      public static MediaNotificationContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Deprecated.
      Reads an instance of MediaNotificationContent from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MediaNotificationContent if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the MediaNotificationContent.