Interface ConditionalRule.Builder

  • Method Details

    • conditions

      The conditions that must all evaluate to true for this rule to match. Conditions are combined with logical AND. Use multiple rules with the same RuleBehavior to express logical OR.

      Parameters:
      conditions - The conditions that must all evaluate to true for this rule to match. Conditions are combined with logical AND. Use multiple rules with the same RuleBehavior to express logical OR.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • conditions

      ConditionalRule.Builder conditions(FieldCondition... conditions)

      The conditions that must all evaluate to true for this rule to match. Conditions are combined with logical AND. Use multiple rules with the same RuleBehavior to express logical OR.

      Parameters:
      conditions - The conditions that must all evaluate to true for this rule to match. Conditions are combined with logical AND. Use multiple rules with the same RuleBehavior to express logical OR.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • conditions

      The conditions that must all evaluate to true for this rule to match. Conditions are combined with logical AND. Use multiple rules with the same RuleBehavior to express logical OR.

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

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

      Parameters:
      conditions - a consumer that will call methods on FieldCondition.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • ruleBehavior

      ConditionalRule.Builder ruleBehavior(String ruleBehavior)

      The field behavior that applies when all conditions in this rule match. Valid values are REQUIRED, OPTIONAL, and DISALLOWED.

      Parameters:
      ruleBehavior - The field behavior that applies when all conditions in this rule match. Valid values are REQUIRED, OPTIONAL, and DISALLOWED.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • conditionalValidation

      ConditionalRule.Builder conditionalValidation(ConditionalValidation conditionalValidation)

      Optional per-rule validation constraints (minimum length, maximum length, regex pattern, allowed select values) that override the field's default validation when this rule matches.

      Parameters:
      conditionalValidation - Optional per-rule validation constraints (minimum length, maximum length, regex pattern, allowed select values) that override the field's default validation when this rule matches.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • conditionalValidation

      default ConditionalRule.Builder conditionalValidation(Consumer<ConditionalValidation.Builder> conditionalValidation)

      Optional per-rule validation constraints (minimum length, maximum length, regex pattern, allowed select values) that override the field's default validation when this rule matches.

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

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to conditionalValidation(ConditionalValidation).

      Parameters:
      conditionalValidation - a consumer that will call methods on ConditionalValidation.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: