Class RuleCondition

    • Method Detail

      • booleanExpression

        public final RuleBooleanExpression booleanExpression()

        The condition applies to a boolean expression passed in this field.

        Returns:
        The condition applies to a boolean expression passed in this field.
      • dmarcExpression

        public final RuleDmarcExpression dmarcExpression()

        The condition applies to a DMARC policy expression passed in this field.

        Returns:
        The condition applies to a DMARC policy expression passed in this field.
      • ipExpression

        public final RuleIpExpression ipExpression()

        The condition applies to an IP address expression passed in this field.

        Returns:
        The condition applies to an IP address expression passed in this field.
      • numberExpression

        public final RuleNumberExpression numberExpression()

        The condition applies to a number expression passed in this field.

        Returns:
        The condition applies to a number expression passed in this field.
      • stringExpression

        public final RuleStringExpression stringExpression()

        The condition applies to a string expression passed in this field.

        Returns:
        The condition applies to a string expression passed in this field.
      • verdictExpression

        public final RuleVerdictExpression verdictExpression()

        The condition applies to a verdict expression passed in this field.

        Returns:
        The condition applies to a verdict expression passed in this field.
      • 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)
      • fromBooleanExpression

        public static RuleCondition fromBooleanExpression​(RuleBooleanExpression booleanExpression)
        Create an instance of this class with booleanExpression() initialized to the given value.

        The condition applies to a boolean expression passed in this field.

        Parameters:
        booleanExpression - The condition applies to a boolean expression passed in this field.
      • fromBooleanExpression

        public static RuleCondition fromBooleanExpression​(Consumer<RuleBooleanExpression.Builder> booleanExpression)
        Create an instance of this class with booleanExpression() initialized to the given value.

        The condition applies to a boolean expression passed in this field.

        Parameters:
        booleanExpression - The condition applies to a boolean expression passed in this field.
      • fromDmarcExpression

        public static RuleCondition fromDmarcExpression​(RuleDmarcExpression dmarcExpression)
        Create an instance of this class with dmarcExpression() initialized to the given value.

        The condition applies to a DMARC policy expression passed in this field.

        Parameters:
        dmarcExpression - The condition applies to a DMARC policy expression passed in this field.
      • fromDmarcExpression

        public static RuleCondition fromDmarcExpression​(Consumer<RuleDmarcExpression.Builder> dmarcExpression)
        Create an instance of this class with dmarcExpression() initialized to the given value.

        The condition applies to a DMARC policy expression passed in this field.

        Parameters:
        dmarcExpression - The condition applies to a DMARC policy expression passed in this field.
      • fromIpExpression

        public static RuleCondition fromIpExpression​(RuleIpExpression ipExpression)
        Create an instance of this class with ipExpression() initialized to the given value.

        The condition applies to an IP address expression passed in this field.

        Parameters:
        ipExpression - The condition applies to an IP address expression passed in this field.
      • fromIpExpression

        public static RuleCondition fromIpExpression​(Consumer<RuleIpExpression.Builder> ipExpression)
        Create an instance of this class with ipExpression() initialized to the given value.

        The condition applies to an IP address expression passed in this field.

        Parameters:
        ipExpression - The condition applies to an IP address expression passed in this field.
      • fromNumberExpression

        public static RuleCondition fromNumberExpression​(RuleNumberExpression numberExpression)
        Create an instance of this class with numberExpression() initialized to the given value.

        The condition applies to a number expression passed in this field.

        Parameters:
        numberExpression - The condition applies to a number expression passed in this field.
      • fromNumberExpression

        public static RuleCondition fromNumberExpression​(Consumer<RuleNumberExpression.Builder> numberExpression)
        Create an instance of this class with numberExpression() initialized to the given value.

        The condition applies to a number expression passed in this field.

        Parameters:
        numberExpression - The condition applies to a number expression passed in this field.
      • fromStringExpression

        public static RuleCondition fromStringExpression​(RuleStringExpression stringExpression)
        Create an instance of this class with stringExpression() initialized to the given value.

        The condition applies to a string expression passed in this field.

        Parameters:
        stringExpression - The condition applies to a string expression passed in this field.
      • fromStringExpression

        public static RuleCondition fromStringExpression​(Consumer<RuleStringExpression.Builder> stringExpression)
        Create an instance of this class with stringExpression() initialized to the given value.

        The condition applies to a string expression passed in this field.

        Parameters:
        stringExpression - The condition applies to a string expression passed in this field.
      • fromVerdictExpression

        public static RuleCondition fromVerdictExpression​(RuleVerdictExpression verdictExpression)
        Create an instance of this class with verdictExpression() initialized to the given value.

        The condition applies to a verdict expression passed in this field.

        Parameters:
        verdictExpression - The condition applies to a verdict expression passed in this field.
      • fromVerdictExpression

        public static RuleCondition fromVerdictExpression​(Consumer<RuleVerdictExpression.Builder> verdictExpression)
        Create an instance of this class with verdictExpression() initialized to the given value.

        The condition applies to a verdict expression passed in this field.

        Parameters:
        verdictExpression - The condition applies to a verdict expression passed in this field.