Interface NotificationQueueMessage.Builder

Enclosing interface:
NotificationQueueMessage

public static interface NotificationQueueMessage.Builder
Builder for creating a NotificationQueueMessage object.
  • Method Details

    • withTemplateName

      NotificationQueueMessage.Builder withTemplateName(String templateName)
      Sets the name of the template to use. Cannot be used in conjunction with withSubject, withBody, or withNotificationText
      Parameters:
      templateName - exact name of the template
      Returns:
      this Builder instance
    • withNotificationText

      NotificationQueueMessage.Builder withNotificationText(String notificationText)
      Sets the content of the notification. Cannot be used in conjunction with withTemplateName
      Parameters:
      notificationText - plain text notification body
      Returns:
      this Builder instance
    • withSubject

      Sets the email subject line for the notification. Cannot be used in conjunction with withTemplateName
      Parameters:
      subject - email subject line
      Returns:
      this Builder instance
    • withBody

      Sets the email message body for the notification. Cannot be used in conjunction with withTemplateName
      Parameters:
      message - main message content
      Returns:
      this Builder instance
    • withTokenRequest

      NotificationQueueMessage.Builder withTokenRequest(TokenRequest tokenRequest)
      Supplies a TokenRequest to resolve tokens within the message. Will get overridden by any values returned by NotificationQueueOperation.onResolveLanguages(Function)
      Parameters:
      tokenRequest - token request holding variable mappings
      Returns:
      this Builder instance
    • build

      Returns:
      the configured NotificationQueueMessage