Class MessageTemplateItem
java.lang.Object
com.azure.communication.messages.models.MessageTemplateItem
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageTemplateItem>
- Direct Known Subclasses:
WhatsAppMessageTemplateItem
public abstract class MessageTemplateItem
extends Object
implements com.azure.json.JsonSerializable<MessageTemplateItem>
The message template as returned from the service.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MessageTemplateItem
(String language, MessageTemplateStatus status) Creates an instance of MessageTemplateItem class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageTemplateItem
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of MessageTemplateItem from the JsonReader.getKind()
Get the kind property: The type discriminator describing a template type.Get the language property: The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.getName()
Get the name property: The template's name.Get the status property: The aggregated template status.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) 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
-
MessageTemplateItem
Creates an instance of MessageTemplateItem class.- Parameters:
language
- the language value to set.status
- the status value to set.
-
-
Method Details
-
getKind
Get the kind property: The type discriminator describing a template type.- Returns:
- the kind value.
-
getName
Get the name property: The template's name.- Returns:
- the name value.
-
getLanguage
Get the language property: The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.- Returns:
- the language value.
-
getStatus
Get the status property: The aggregated template status.- Returns:
- the status value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<MessageTemplateItem>
- Throws:
IOException
-
fromJson
Reads an instance of MessageTemplateItem from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of MessageTemplateItem 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 MessageTemplateItem.
-