Class MessageTemplateText
java.lang.Object
com.azure.communication.messages.models.MessageTemplateValue
com.azure.communication.messages.models.MessageTemplateText
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTemplateValue>
The message template's text value information.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageTemplateText
(String refValue, String text) Creates an instance of MessageTemplateText class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTemplateText
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MessageTemplateText from the JsonReader.getKind()
Get the kind property: The type discriminator describing a template parameter type.getText()
Get the text property: The text value.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
-
MessageTemplateText
Creates an instance of MessageTemplateText class.- Parameters:
refValue
- the refValue value to set.text
- the text 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.
-
getText
Get the text property: The text value.- Returns:
- the text value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MessageTemplateValue>
- Overrides:
toJson
in classMessageTemplateValue
- Throws:
IOException
-
fromJson
Reads an instance of MessageTemplateText from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MessageTemplateText 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 MessageTemplateText.
-