Class MessageTemplateVideo

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

public final class MessageTemplateVideo extends MessageTemplateValue
The message template's video value information.
  • Constructor Details

    • MessageTemplateVideo

      public MessageTemplateVideo(String refValue, String url)
      Creates an instance of MessageTemplateVideo class.
      Parameters:
      refValue - the refValue value to set.
      url - the url value to set.
  • Method Details

    • getKind

      public MessageTemplateValueKind getKind()
      Get the kind property: The type discriminator describing a template parameter type.
      Overrides:
      getKind in class MessageTemplateValue
      Returns:
      the kind value.
    • getUrl

      public String getUrl()
      Get the url property: The (public) URL of the media.
      Returns:
      the url value.
    • getCaption

      public String getCaption()
      Get the caption property: The [optional] caption of the media object.
      Returns:
      the caption value.
    • setCaption

      public MessageTemplateVideo setCaption(String caption)
      Set the caption property: The [optional] caption of the media object.
      Parameters:
      caption - the caption value to set.
      Returns:
      the MessageTemplateVideo object itself.
    • getFileName

      public String getFileName()
      Get the fileName property: The [optional] filename of the media file.
      Returns:
      the fileName value.
    • setFileName

      public MessageTemplateVideo setFileName(String fileName)
      Set the fileName property: The [optional] filename of the media file.
      Parameters:
      fileName - the fileName value to set.
      Returns:
      the MessageTemplateVideo object itself.
    • toJson

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

      public static MessageTemplateVideo fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MessageTemplateVideo from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MessageTemplateVideo 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 MessageTemplateVideo.