Class PushNotification.PushNotificationBuilder

  • Enclosing class:
    PushNotification

    public static class PushNotification.PushNotificationBuilder
    extends java.lang.Object
    Builder class responsible for producing Notifications.
    • Constructor Detail

      • PushNotificationBuilder

        public PushNotificationBuilder()
    • Method Detail

      • setMechanismUID

        public PushNotification.PushNotificationBuilder setMechanismUID​(java.lang.String mechanismUID)
        Sets the mechanism unique Id.
        Parameters:
        mechanismUID - the mechanism unique Id.
        Returns:
        The current builder.
      • setMessageId

        public PushNotification.PushNotificationBuilder setMessageId​(java.lang.String messageId)
        Sets the message id that was received with this notification.
        Parameters:
        messageId - The messageId that was received.
        Returns:
        The current builder.
      • setMessage

        public PushNotification.PushNotificationBuilder setMessage​(java.lang.String message)
        Sets the message that was received with this notification.
        Parameters:
        message - The message that was received.
        Returns:
        The current builder.
      • setChallenge

        public PushNotification.PushNotificationBuilder setChallenge​(java.lang.String challenge)
        Set the challenge that was sent with this notification.
        Parameters:
        challenge - The base64 encoded challenge.
        Returns:
        The current builder.
      • setAmlbCookie

        public PushNotification.PushNotificationBuilder setAmlbCookie​(java.lang.String amlbCookie)
        Set the he AM load balance cookie with this notification.
        Parameters:
        amlbCookie - the load balance cookie.
        Returns:
        The current builder.
      • setTimeAdded

        public PushNotification.PushNotificationBuilder setTimeAdded​(java.util.Calendar timeAdded)
        Sets the date that the notification was received.
        Parameters:
        timeAdded - The date received in UTC.
        Returns:
        The current builder.
      • setTimeExpired

        public PushNotification.PushNotificationBuilder setTimeExpired​(java.util.Calendar timeExpired)
        Sets the date that the notification will automatically fail.
        Parameters:
        timeExpired - The expiry date.
        Returns:
        The current builder.
      • setApproved

        public PushNotification.PushNotificationBuilder setApproved​(boolean approved)
        Sets whether the authentication the notification is related to was approved.
        Parameters:
        approved - True if the authentication was approved, false otherwise.
        Returns:
        The current builder.
      • setPending

        public PushNotification.PushNotificationBuilder setPending​(boolean pending)
        Sets whether the authentication the notification is related to has been handled.
        Parameters:
        pending - True if the authentication has not been handled, false otherwise.
        Returns:
        The current builder.
      • setCustomPayload

        public PushNotification.PushNotificationBuilder setCustomPayload​(java.lang.String customPayload)
        Sets custom attributes associated with this notification.
        Parameters:
        customPayload - JSON String containing the custom attributes
        Returns:
        The current builder.
      • setNumbersChallenge

        public PushNotification.PushNotificationBuilder setNumbersChallenge​(java.lang.String numbersChallenge)
        Sets the numbers used in the Push challenge.
        Parameters:
        numbersChallenge - String containing the numbers for challenge
        Returns:
        The current builder.
      • setContextInfo

        public PushNotification.PushNotificationBuilder setContextInfo​(java.lang.String contextInfo)
        Sets context information for this notification.
        Parameters:
        contextInfo - JSON String containing the context information.
        Returns:
        The current builder.
      • setPushType

        public PushNotification.PushNotificationBuilder setPushType​(java.lang.String pushType)
        Sets the type of Push notification.
        Parameters:
        pushType - the push type
        Returns:
        The current builder.