Class NotificationSendRequest


  • public final class NotificationSendRequest
    extends Object
    A request to send a notification to a set of recipients via a specific channel. It includes all necessary information such as recipients, subject, body, and MIME type.
    • Method Detail

      • getRecipient

        public NotificationRecipient getRecipient()
        The recipient information for the notification.
      • getNotificationType

        public NotificationType getNotificationType()
        The type of notification.
      • getNotificationHistory

        public Set<NotificationHistoryRecord> getNotificationHistory()
        Optional: notification history that is to be persisted, once the notification was sent via the provided channel.
      • getRecipientEndpoints

        public Set<String> getRecipientEndpoints()
        The set of recipient endpoints (e.g., email addresses) to which the notification should be sent.
      • isRecipientPrivacyRequired

        public boolean isRecipientPrivacyRequired()
        Indicates whether recipient privacy is required. If true, each recipient will receive an individual message without seeing other recipients.
      • getSubject

        public String getSubject()
        The subject of the notification message.
      • getBody

        public String getBody()
        The body content of the notification message.
      • getBodyContentType

        public String getBodyContentType()
        The MIME type of the body content (e.g., text/plain, text/html).
      • getChannelType

        public NotificationChannelType getChannelType()
        The type of notification channel through which the message should be sent (e.g., EMAIL).
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • of

        public static NotificationSendRequest of​(NotificationRecipient recipient,
                                                 NotificationType notificationType,
                                                 Set<NotificationHistoryRecord> notificationHistory,
                                                 Set<String> recipientEndpoints,
                                                 boolean recipientPrivacyRequired,
                                                 String subject,
                                                 String body,
                                                 String bodyContentType,
                                                 NotificationChannelType channelType)
        Creates a new NotificationSendRequest instance.
        Parameters:
        recipient - The recipient information for the notification.
        notificationType - The type of notification.
        notificationHistory - Optional: notification history that is to be persisted, once the notification was sent via the provided channel.
        recipientEndpoints - The set of recipient endpoints (e.g., email addresses) to which the notification should be sent.
        recipientPrivacyRequired - Indicates whether recipient privacy is required. If true, each recipient will receive an individual message without seeing other recipients.
        subject - The subject of the notification message.
        body - The body content of the notification message.
        bodyContentType - The MIME type of the body content (e.g., text/plain, text/html).
        channelType - The type of notification channel through which the message should be sent (e.g., EMAIL).