Class NotificationContent
java.lang.Object
com.azure.communication.messages.models.NotificationContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<NotificationContent>
- Direct Known Subclasses:
AudioNotificationContent
,DocumentNotificationContent
,ImageNotificationContent
,MediaNotificationContent
,TemplateNotificationContent
,TextNotificationContent
,VideoNotificationContent
public abstract class NotificationContent
extends Object
implements com.azure.json.JsonSerializable<NotificationContent>
Details of the message to send.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
NotificationContent
(String channelRegistrationId, List<String> to) Creates an instance of NotificationContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic NotificationContent
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of NotificationContent from the JsonReader.Get the channelRegistrationId property: The Channel Registration ID for the Business Identifier.getKind()
Get the kind property: The type discriminator describing a notification type.getTo()
Get the to property: The native external platform user identifiers of the recipient.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
-
NotificationContent
Creates an instance of NotificationContent class.- Parameters:
channelRegistrationId
- the channelRegistrationId value to set.to
- the to value to set.
-
-
Method Details
-
getKind
Get the kind property: The type discriminator describing a notification type.- Returns:
- the kind value.
-
getChannelRegistrationId
Get the channelRegistrationId property: The Channel Registration ID for the Business Identifier.- Returns:
- the channelRegistrationId value.
-
getTo
Get the to property: The native external platform user identifiers of the recipient.- Returns:
- the to value.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<NotificationContent>
- Throws:
IOException
-
fromJson
Reads an instance of NotificationContent from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of NotificationContent 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 NotificationContent.
-