Class TemplateNotificationContent
java.lang.Object
com.azure.communication.messages.models.NotificationContent
com.azure.communication.messages.models.TemplateNotificationContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<NotificationContent>
A request to send a template notification.
-
Constructor Summary
ConstructorsConstructorDescriptionTemplateNotificationContent
(String channelRegistrationId, List<String> to, MessageTemplate template) Creates an instance of TemplateNotificationContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic TemplateNotificationContent
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of TemplateNotificationContent from the JsonReader.getKind()
Get the kind property: The type discriminator describing a notification type.Get the template property: The template object used to create templates.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.communication.messages.models.NotificationContent
getChannelRegistrationId, getTo
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
-
TemplateNotificationContent
public TemplateNotificationContent(String channelRegistrationId, List<String> to, MessageTemplate template) Creates an instance of TemplateNotificationContent class.- Parameters:
channelRegistrationId
- the channelRegistrationId value to set.to
- the to value to set.template
- the template value to set.
-
-
Method Details
-
getKind
Get the kind property: The type discriminator describing a notification type.- Overrides:
getKind
in classNotificationContent
- Returns:
- the kind value.
-
getTemplate
Get the template property: The template object used to create templates.- Returns:
- the template value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<NotificationContent>
- Overrides:
toJson
in classNotificationContent
- Throws:
IOException
-
fromJson
public static TemplateNotificationContent fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of TemplateNotificationContent from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of TemplateNotificationContent 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 TemplateNotificationContent.
-