Interface Rule.Builder

    • Method Detail

      • actions

        Rule.Builder actions​(Collection<RuleAction> actions)

        The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.

        Parameters:
        actions - The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • actions

        Rule.Builder actions​(RuleAction... actions)

        The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.

        Parameters:
        actions - The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • actions

        Rule.Builder actions​(Consumer<RuleAction.Builder>... actions)

        The list of actions to execute when the conditions match the incoming email, and none of the "unless conditions" match.

        This is a convenience method that creates an instance of the RuleAction.Builder avoiding the need to create one manually via RuleAction.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #actions(List).

        Parameters:
        actions - a consumer that will call methods on RuleAction.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #actions(java.util.Collection)
      • conditions

        Rule.Builder conditions​(Collection<RuleCondition> conditions)

        The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"

        Parameters:
        conditions - The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • conditions

        Rule.Builder conditions​(RuleCondition... conditions)

        The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"

        Parameters:
        conditions - The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • conditions

        Rule.Builder conditions​(Consumer<RuleCondition.Builder>... conditions)

        The conditions of this rule. All conditions must match the email for the actions to be executed. An empty list of conditions means that all emails match, but are still subject to any "unless conditions"

        This is a convenience method that creates an instance of the RuleCondition.Builder avoiding the need to create one manually via RuleCondition.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #conditions(List).

        Parameters:
        conditions - a consumer that will call methods on RuleCondition.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #conditions(java.util.Collection)
      • name

        Rule.Builder name​(String name)

        The user-friendly name of the rule.

        Parameters:
        name - The user-friendly name of the rule.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • unless

        Rule.Builder unless​(Collection<RuleCondition> unless)

        The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.

        Parameters:
        unless - The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • unless

        Rule.Builder unless​(RuleCondition... unless)

        The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.

        Parameters:
        unless - The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • unless

        Rule.Builder unless​(Consumer<RuleCondition.Builder>... unless)

        The "unless conditions" of this rule. None of the conditions can match the email for the actions to be executed. If any of these conditions do match the email, then the actions are not executed.

        This is a convenience method that creates an instance of the RuleCondition.Builder avoiding the need to create one manually via RuleCondition.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #unless(List).

        Parameters:
        unless - a consumer that will call methods on RuleCondition.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #unless(java.util.Collection)