Class WhatsAppMessageTemplateItem
java.lang.Object
com.azure.communication.messages.models.MessageTemplateItem
com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTemplateItem>
The WhatsApp-specific template response contract.
-
Method Summary
Modifier and TypeMethodDescriptionstatic WhatsAppMessageTemplateItem
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of WhatsAppMessageTemplateItem from the JsonReader.com.azure.core.util.BinaryData
Get the content property: WhatsApp platform's template content.getKind()
Get the kind property: The type discriminator describing a template type.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.communication.messages.models.MessageTemplateItem
getLanguage, getName, getStatus
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
-
Method Details
-
getKind
Get the kind property: The type discriminator describing a template type.- Overrides:
getKind
in classMessageTemplateItem
- Returns:
- the kind value.
-
getContent
public com.azure.core.util.BinaryData getContent()Get the content property: WhatsApp platform's template content. This is the payload returned from WhatsApp API.- Returns:
- the content value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MessageTemplateItem>
- Overrides:
toJson
in classMessageTemplateItem
- Throws:
IOException
-
fromJson
public static WhatsAppMessageTemplateItem fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of WhatsAppMessageTemplateItem from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of WhatsAppMessageTemplateItem 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 WhatsAppMessageTemplateItem.
-