Class MessageTemplateDocument
java.lang.Object
com.azure.communication.messages.models.MessageTemplateValue
com.azure.communication.messages.models.MessageTemplateDocument
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTemplateValue>
The message template's document value information.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageTemplateDocument
(String refValue, String url) Creates an instance of MessageTemplateDocument class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTemplateDocument
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MessageTemplateDocument from the JsonReader.Get the caption property: The [optional] caption of the media object.Get the fileName property: The [optional] filename of the media file.getKind()
Get the kind property: The type discriminator describing a template parameter type.getUrl()
Get the url property: The (public) URL of the media.setCaption
(String caption) Set the caption property: The [optional] caption of the media object.setFileName
(String fileName) Set the fileName property: The [optional] filename of the media file.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.communication.messages.models.MessageTemplateValue
getRefValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MessageTemplateDocument
Creates an instance of MessageTemplateDocument class.- Parameters:
refValue
- the refValue value to set.url
- the url value to set.
-
-
Method Details
-
getKind
Get the kind property: The type discriminator describing a template parameter type.- Overrides:
getKind
in classMessageTemplateValue
- Returns:
- the kind value.
-
getUrl
Get the url property: The (public) URL of the media.- Returns:
- the url value.
-
getCaption
Get the caption property: The [optional] caption of the media object.- Returns:
- the caption value.
-
setCaption
Set the caption property: The [optional] caption of the media object.- Parameters:
caption
- the caption value to set.- Returns:
- the MessageTemplateDocument object itself.
-
getFileName
Get the fileName property: The [optional] filename of the media file.- Returns:
- the fileName value.
-
setFileName
Set the fileName property: The [optional] filename of the media file.- Parameters:
fileName
- the fileName value to set.- Returns:
- the MessageTemplateDocument object itself.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MessageTemplateValue>
- Overrides:
toJson
in classMessageTemplateValue
- Throws:
IOException
-
fromJson
public static MessageTemplateDocument fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of MessageTemplateDocument from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MessageTemplateDocument 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 MessageTemplateDocument.
-