Class RuleAction

    • Method Detail

      • addHeader

        public final AddHeaderAction addHeader()

        This action adds a header. This can be used to add arbitrary email headers.

        Returns:
        This action adds a header. This can be used to add arbitrary email headers.
      • archive

        public final ArchiveAction archive()

        This action archives the email. This can be used to deliver an email to an archive.

        Returns:
        This action archives the email. This can be used to deliver an email to an archive.
      • deliverToMailbox

        public final DeliverToMailboxAction deliverToMailbox()

        This action delivers an email to a WorkMail mailbox.

        Returns:
        This action delivers an email to a WorkMail mailbox.
      • drop

        public final DropAction drop()

        This action terminates the evaluation of rules in the rule set.

        Returns:
        This action terminates the evaluation of rules in the rule set.
      • relay

        public final RelayAction relay()

        This action relays the email to another SMTP server.

        Returns:
        This action relays the email to another SMTP server.
      • replaceRecipient

        public final ReplaceRecipientAction replaceRecipient()

        The action replaces certain or all recipients with a different set of recipients.

        Returns:
        The action replaces certain or all recipients with a different set of recipients.
      • send

        public final SendAction send()

        This action sends the email to the internet.

        Returns:
        This action sends the email to the internet.
      • writeToS3

        public final S3Action writeToS3()

        This action writes the MIME content of the email to an S3 bucket.

        Returns:
        This action writes the MIME content of the email to an S3 bucket.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)
      • fromAddHeader

        public static RuleAction fromAddHeader​(AddHeaderAction addHeader)
        Create an instance of this class with addHeader() initialized to the given value.

        This action adds a header. This can be used to add arbitrary email headers.

        Parameters:
        addHeader - This action adds a header. This can be used to add arbitrary email headers.
      • fromAddHeader

        public static RuleAction fromAddHeader​(Consumer<AddHeaderAction.Builder> addHeader)
        Create an instance of this class with addHeader() initialized to the given value.

        This action adds a header. This can be used to add arbitrary email headers.

        Parameters:
        addHeader - This action adds a header. This can be used to add arbitrary email headers.
      • fromArchive

        public static RuleAction fromArchive​(ArchiveAction archive)
        Create an instance of this class with archive() initialized to the given value.

        This action archives the email. This can be used to deliver an email to an archive.

        Parameters:
        archive - This action archives the email. This can be used to deliver an email to an archive.
      • fromArchive

        public static RuleAction fromArchive​(Consumer<ArchiveAction.Builder> archive)
        Create an instance of this class with archive() initialized to the given value.

        This action archives the email. This can be used to deliver an email to an archive.

        Parameters:
        archive - This action archives the email. This can be used to deliver an email to an archive.
      • fromDeliverToMailbox

        public static RuleAction fromDeliverToMailbox​(DeliverToMailboxAction deliverToMailbox)
        Create an instance of this class with deliverToMailbox() initialized to the given value.

        This action delivers an email to a WorkMail mailbox.

        Parameters:
        deliverToMailbox - This action delivers an email to a WorkMail mailbox.
      • fromDeliverToMailbox

        public static RuleAction fromDeliverToMailbox​(Consumer<DeliverToMailboxAction.Builder> deliverToMailbox)
        Create an instance of this class with deliverToMailbox() initialized to the given value.

        This action delivers an email to a WorkMail mailbox.

        Parameters:
        deliverToMailbox - This action delivers an email to a WorkMail mailbox.
      • fromDrop

        public static RuleAction fromDrop​(DropAction drop)
        Create an instance of this class with drop() initialized to the given value.

        This action terminates the evaluation of rules in the rule set.

        Parameters:
        drop - This action terminates the evaluation of rules in the rule set.
      • fromDrop

        public static RuleAction fromDrop​(Consumer<DropAction.Builder> drop)
        Create an instance of this class with drop() initialized to the given value.

        This action terminates the evaluation of rules in the rule set.

        Parameters:
        drop - This action terminates the evaluation of rules in the rule set.
      • fromRelay

        public static RuleAction fromRelay​(RelayAction relay)
        Create an instance of this class with relay() initialized to the given value.

        This action relays the email to another SMTP server.

        Parameters:
        relay - This action relays the email to another SMTP server.
      • fromRelay

        public static RuleAction fromRelay​(Consumer<RelayAction.Builder> relay)
        Create an instance of this class with relay() initialized to the given value.

        This action relays the email to another SMTP server.

        Parameters:
        relay - This action relays the email to another SMTP server.
      • fromReplaceRecipient

        public static RuleAction fromReplaceRecipient​(ReplaceRecipientAction replaceRecipient)
        Create an instance of this class with replaceRecipient() initialized to the given value.

        The action replaces certain or all recipients with a different set of recipients.

        Parameters:
        replaceRecipient - The action replaces certain or all recipients with a different set of recipients.
      • fromReplaceRecipient

        public static RuleAction fromReplaceRecipient​(Consumer<ReplaceRecipientAction.Builder> replaceRecipient)
        Create an instance of this class with replaceRecipient() initialized to the given value.

        The action replaces certain or all recipients with a different set of recipients.

        Parameters:
        replaceRecipient - The action replaces certain or all recipients with a different set of recipients.
      • fromSend

        public static RuleAction fromSend​(SendAction send)
        Create an instance of this class with send() initialized to the given value.

        This action sends the email to the internet.

        Parameters:
        send - This action sends the email to the internet.
      • fromSend

        public static RuleAction fromSend​(Consumer<SendAction.Builder> send)
        Create an instance of this class with send() initialized to the given value.

        This action sends the email to the internet.

        Parameters:
        send - This action sends the email to the internet.
      • fromWriteToS3

        public static RuleAction fromWriteToS3​(S3Action writeToS3)
        Create an instance of this class with writeToS3() initialized to the given value.

        This action writes the MIME content of the email to an S3 bucket.

        Parameters:
        writeToS3 - This action writes the MIME content of the email to an S3 bucket.
      • fromWriteToS3

        public static RuleAction fromWriteToS3​(Consumer<S3Action.Builder> writeToS3)
        Create an instance of this class with writeToS3() initialized to the given value.

        This action writes the MIME content of the email to an S3 bucket.

        Parameters:
        writeToS3 - This action writes the MIME content of the email to an S3 bucket.
      • type

        public RuleAction.Type type()
        Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will be RuleAction.Type.UNKNOWN_TO_SDK_VERSION if the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will be RuleAction.Type.UNKNOWN_TO_SDK_VERSION if zero members are set, and null if more than one member is set.